Netdev List
 help / color / mirror / Atom feed
* Re: [BUG] IPv6 recursive locking
From: David Miller @ 2008-02-18  2:43 UTC (permalink / raw)
  To: dlezcano; +Cc: Kristof, netdev
In-Reply-To: <47B87D2B.7040400@fr.ibm.com>

From: Daniel Lezcano <dlezcano@fr.ibm.com>
Date: Sun, 17 Feb 2008 19:30:03 +0100

> I think this bug was introduced by the commit:
> 
> 69cc64d8d92bf852f933e90c888dfff083bd4fc9
> "[NDISC]: Fix race in generic address resolution".

Yep and I'll revert this for now.

^ permalink raw reply

* Re: [BUG] IPv6 recursive locking
From: David Miller @ 2008-02-18  2:41 UTC (permalink / raw)
  To: Kristof; +Cc: netdev
In-Reply-To: <20080217141229.GB1677@nereid>

From: Kristof Provost <Kristof@provost-engineering.be>
Date: Sun, 17 Feb 2008 14:12:29 +0000

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> I'm running the current git (1309d4e68497184d2fd87e892ddf14076c2bda98) 
> without problems. While I was toying with IPv6 on my local network I managed 
> to completely hang my machine whenever it receives or sends a neighbour
> sollictation. At least, I think that's the cause. It started as soon as I 
> installed radvd on the router. The included trace seems to point in the same
> direction.
> 
> The machine is a Dell Latitude D505 (so x86). Network interfaces are e100 and
> ipw2200 (firmware not loaded). I'm currently using the e100.
> 
> I'll try to bisect it but here's the trace already. Let me know if
> there's anything else you'd like to know.

I've committed the following revert to fix this, the race bug
will need another solution, perhaps the one which uses skb_copy().

commit 9ff566074689e3aed1488780b97714ec43ba361d
Author: David S. Miller <davem@davemloft.net>
Date:   Sun Feb 17 18:39:54 2008 -0800

    Revert "[NDISC]: Fix race in generic address resolution"
    
    This reverts commit 69cc64d8d92bf852f933e90c888dfff083bd4fc9.
    
    It causes recursive locking in IPV6 because unlike other
    neighbour layer clients, it even needs neighbour cache
    entries to send neighbour soliciation messages :-(
    
    We'll have to find another way to fix this race.
    
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 7bb6a9a..a16cf1e 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -834,12 +834,18 @@ static void neigh_timer_handler(unsigned long arg)
 	}
 	if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) {
 		struct sk_buff *skb = skb_peek(&neigh->arp_queue);
-
+		/* keep skb alive even if arp_queue overflows */
+		if (skb)
+			skb_get(skb);
+		write_unlock(&neigh->lock);
 		neigh->ops->solicit(neigh, skb);
 		atomic_inc(&neigh->probes);
-	}
+		if (skb)
+			kfree_skb(skb);
+	} else {
 out:
-	write_unlock(&neigh->lock);
+		write_unlock(&neigh->lock);
+	}
 
 	if (notify)
 		neigh_update_notify(neigh);
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index c663fa5..8e17f65 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -368,6 +368,7 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
 		if (!(neigh->nud_state&NUD_VALID))
 			printk(KERN_DEBUG "trying to ucast probe in NUD_INVALID\n");
 		dst_ha = neigh->ha;
+		read_lock_bh(&neigh->lock);
 	} else if ((probes -= neigh->parms->app_probes) < 0) {
 #ifdef CONFIG_ARPD
 		neigh_app_ns(neigh);
@@ -377,6 +378,8 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
 
 	arp_send(ARPOP_REQUEST, ETH_P_ARP, target, dev, saddr,
 		 dst_ha, dev->dev_addr, NULL);
+	if (dst_ha)
+		read_unlock_bh(&neigh->lock);
 }
 
 static int arp_ignore(struct in_device *in_dev, __be32 sip, __be32 tip)


^ permalink raw reply related

* Re: tbench regression in 2.6.25-rc1
From: Zhang, Yanmin @ 2008-02-18  1:39 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: herbert, LKML, netdev
In-Reply-To: <47B59FFC.4030603@cosmosbay.com>

On Fri, 2008-02-15 at 15:21 +0100, Eric Dumazet wrote:
> Zhang, Yanmin a écrit :
> > On Fri, 2008-02-15 at 07:05 +0100, Eric Dumazet wrote:
> >   
> >> Zhang, Yanmin a �crit :
> >>     
> >>> Comparing with kernel 2.6.24, tbench result has regression with
> >>> 2.6.25-rc1.
> >>>
> >>> 1) On 2 quad-core processor stoakley: 4%.
> >>> 2) On 4 quad-core processor tigerton: more than 30%.
> >>>
> >>> bisect located below patch.
> >>>
> >>> b4ce92775c2e7ff9cf79cca4e0a19c8c5fd6287b is first bad commit
> >>> commit b4ce92775c2e7ff9cf79cca4e0a19c8c5fd6287b
> >>> Author: Herbert Xu <herbert@gondor.apana.org.au>
> >>> Date:   Tue Nov 13 21:33:32 2007 -0800
> >>>
> >>>     [IPV6]: Move nfheader_len into rt6_info
> >>>     
> >>>     The dst member nfheader_len is only used by IPv6.  It's also currently
> >>>     creating a rather ugly alignment hole in struct dst.  Therefore this patch
> >>>     moves it from there into struct rt6_info.
> >>>
> >>>
> >>> As tbench uses ipv4, so the patch's real impact on ipv4 is it deletes
> >>> nfheader_len in dst_entry. It might change cache line alignment.
> >>>
> >>> To verify my finding, I just added nfheader_len back to dst_entry in 2.6.25-rc1
> >>> and reran tbench on the 2 machines. Performance could be recovered completely.
> >>>
> >>> I started cpu_number*2 tbench processes. On my 16-core tigerton:
> >>> #./tbench_srv &
> >>> #./tbench 32 127.0.0.1
> >>>
> >>> -yanmin
> >>>       
> >> Yup. struct dst is sensitive to alignements, especially for benches.
> >>
> >> In the real world, we need to make sure that next pointer start at a cache 
> >> line bondary (or a litle bit after), so that RT cache lookups use one cache 
> >> line per entry instead of two. This permits better behavior in DDOS attacks.
> >>
> >> (check commit 1e19e02ca0c5e33ea73a25127dbe6c3b8fcaac4b for reference)
> >>
> >> Are you using a 64 or a 32 bit kernel ?
> >>     
> > 64bit x86-64 machine. On another 4-way Madison Itanium machine, tbench has the
> > similiar regression.
> >
> >   
> 
> On linux-2.6.25-rc1 x86_64 :
> 
> offsetof(struct dst_entry, lastuse)=0xb0
> offsetof(struct dst_entry, __refcnt)=0xb8
> offsetof(struct dst_entry, __use)=0xbc
> offsetof(struct dst_entry, next)=0xc0
> 
> So it should be optimal... I dont know why tbench prefers __refcnt being 
> on 0xc0, since in this case lastuse will be on a different cache line...
> 
> Each incoming IP packet will need to change lastuse, __refcnt and __use, 
> so keeping them in the same cache line is a win.
> 
> I suspect then that even this patch could help tbench, since it avoids 
> writing lastuse...
> 
> diff --git a/include/net/dst.h b/include/net/dst.h
> index e3ac7d0..24d3c4e 100644
> --- a/include/net/dst.h
> +++ b/include/net/dst.h
> @@ -147,7 +147,8 @@ static inline void dst_use(struct dst_entry *dst, 
> unsigned long time)
>  {
>         dst_hold(dst);
>         dst->__use++;
> -       dst->lastuse = time;
> +       if (time != dst->lastuse)
> +               dst->lastuse = time;
>  }
I did a quick test and this patch doesn't help tbench.

Thanks,
-yanmin



^ permalink raw reply

* Re: broken link-local multicast?
From: Marco d'Itri @ 2008-02-18  1:21 UTC (permalink / raw)
  To: Pekka Savola, David Stevens; +Cc: netdev
In-Reply-To: <alpine.LRH.1.00.0802150928020.3621@netcore.fi>

On Feb 15, Pekka Savola <pekkas@netcore.fi> wrote:

>> root@frwl-5a:~# ping6 -c 1 -I eth1 ff02::1
>> connect: Network is unreachable
>
> Maybe 'netstat -gn' could give clues, because you should be receiving a 
> response at least from the loopback address.  Maybe your loopback  
> interface has went down, or ospf6d took it down and back up (at least  
> some time ago, kernel's v6 got very confused after that).
The loopback is up. ospf6d /may/ have done something to it, but I do not
know how to check this (and I cannot reboot these servers right now).

1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever

> You may also want to check out that your link-local address on the  
> interface you're pinging is still OK.
Apparently it is:

root@frwl-5a:~#  netstat -gn | grep eth1
eth1            1      224.0.0.5
eth1            1      224.0.0.1
eth1            1      ff02::6
eth1            1      ff02::5
eth1            2      ff02::1:ff00:0
eth1            1      ff02::2
eth1            1      ff02::1:ff00:89
eth1            1      ff02::1:ffd8:7dd
eth1            1      ff02::1

These (except ff02::1:ffd8:7dd, which is different) are the same
addresses of eth0, which works.

On Feb 15, David Stevens <dlstevens@us.ibm.com> wrote:

> Marco,
>         You called this a "firewall" -- do you get the same thing
> when you have no iptables rules?
Yes, I double checked again and reproduced these results with totally
empty v6 chains.

-- 
ciao,
Marco

^ permalink raw reply

* Re: Subject: [PATCH] Revert "[RTNETLINK]: Send a single notification on device state changes."
From: Rafael J. Wysocki @ 2008-02-17 23:35 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Linus Torvalds, David S. Miller, linux-kernel, Laszlo Attila Toth,
	Zdenek Kabelac, François Valenduc, netdev, Andrew Morton
In-Reply-To: <Pine.LNX.4.64.0802180027331.30955@jikos.suse.cz>

On Monday, 18 of February 2008, Jiri Kosina wrote:
> This reverts commit 45b503548210fe6f23e92b856421c2a3f05fd034.
> 
> It contains deadlock, and breaks userspace applications (wpa_supplicant,
> networkmanager). References:
> 
> http://bugzilla.kernel.org/show_bug.cgi?id=10002
> http://bugzilla.kernel.org/show_bug.cgi?id=10002

I think Andrew has already queued this one up.

Thanks,
Rafael


> ---
>  net/core/rtnetlink.c |   36 ++++++++++--------------------------
>  1 files changed, 10 insertions(+), 26 deletions(-)
> 
> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
> index ecb02af..61ac8d0 100644
> --- a/net/core/rtnetlink.c
> +++ b/net/core/rtnetlink.c
> @@ -504,7 +504,7 @@ int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id,
>  
>  EXPORT_SYMBOL_GPL(rtnl_put_cacheinfo);
>  
> -static int set_operstate(struct net_device *dev, unsigned char transition, bool send_notification)
> +static void set_operstate(struct net_device *dev, unsigned char transition)
>  {
>  	unsigned char operstate = dev->operstate;
>  
> @@ -527,12 +527,8 @@ static int set_operstate(struct net_device *dev, unsigned char transition, bool
>  		write_lock_bh(&dev_base_lock);
>  		dev->operstate = operstate;
>  		write_unlock_bh(&dev_base_lock);
> -
> -		if (send_notification)
> -			netdev_state_change(dev);
> -		return 1;
> -	} else
> -		return 0;
> +		netdev_state_change(dev);
> +	}
>  }
>  
>  static void copy_rtnl_link_stats(struct rtnl_link_stats *a,
> @@ -826,7 +822,6 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
>  	if (tb[IFLA_BROADCAST]) {
>  		nla_memcpy(dev->broadcast, tb[IFLA_BROADCAST], dev->addr_len);
>  		send_addr_notify = 1;
> -		modified = 1;
>  	}
>  
>  	if (ifm->ifi_flags || ifm->ifi_change) {
> @@ -839,23 +834,16 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
>  		dev_change_flags(dev, flags);
>  	}
>  
> -	if (tb[IFLA_TXQLEN]) {
> -		if (dev->tx_queue_len != nla_get_u32(tb[IFLA_TXQLEN])) {
> -			dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]);
> -			modified = 1;
> -		}
> -	}
> +	if (tb[IFLA_TXQLEN])
> +		dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]);
>  
>  	if (tb[IFLA_OPERSTATE])
> -		modified |= set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]), false);
> +		set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]));
>  
>  	if (tb[IFLA_LINKMODE]) {
> -		if (dev->link_mode != nla_get_u8(tb[IFLA_LINKMODE])) {
> -			write_lock_bh(&dev_base_lock);
> -			dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]);
> -			write_lock_bh(&dev_base_lock);
> -			modified = 1;
> -		}
> +		write_lock_bh(&dev_base_lock);
> +		dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]);
> +		write_unlock_bh(&dev_base_lock);
>  	}
>  
>  	err = 0;
> @@ -869,10 +857,6 @@ errout:
>  
>  	if (send_addr_notify)
>  		call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
> -
> -	if (modified)
> -		netdev_state_change(dev);
> -
>  	return err;
>  }
>  
> @@ -990,7 +974,7 @@ struct net_device *rtnl_create_link(struct net *net, char *ifname,
>  	if (tb[IFLA_TXQLEN])
>  		dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]);
>  	if (tb[IFLA_OPERSTATE])
> -		set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]), true);
> +		set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]));
>  	if (tb[IFLA_LINKMODE])
>  		dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]);
>  



-- 
"Premature optimization is the root of all evil." - Donald Knuth

^ permalink raw reply

* Subject: [PATCH] Revert "[RTNETLINK]: Send a single notification on device state changes."
From: Jiri Kosina @ 2008-02-17 23:31 UTC (permalink / raw)
  To: Linus Torvalds, David S. Miller
  Cc: linux-kernel, Laszlo Attila Toth, Zdenek Kabelac,
	François Valenduc, Rafael J. Wysocki, netdev

This reverts commit 45b503548210fe6f23e92b856421c2a3f05fd034.

It contains deadlock, and breaks userspace applications (wpa_supplicant,
networkmanager). References:

http://bugzilla.kernel.org/show_bug.cgi?id=10002
http://bugzilla.kernel.org/show_bug.cgi?id=10002
---
 net/core/rtnetlink.c |   36 ++++++++++--------------------------
 1 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index ecb02af..61ac8d0 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -504,7 +504,7 @@ int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id,
 
 EXPORT_SYMBOL_GPL(rtnl_put_cacheinfo);
 
-static int set_operstate(struct net_device *dev, unsigned char transition, bool send_notification)
+static void set_operstate(struct net_device *dev, unsigned char transition)
 {
 	unsigned char operstate = dev->operstate;
 
@@ -527,12 +527,8 @@ static int set_operstate(struct net_device *dev, unsigned char transition, bool
 		write_lock_bh(&dev_base_lock);
 		dev->operstate = operstate;
 		write_unlock_bh(&dev_base_lock);
-
-		if (send_notification)
-			netdev_state_change(dev);
-		return 1;
-	} else
-		return 0;
+		netdev_state_change(dev);
+	}
 }
 
 static void copy_rtnl_link_stats(struct rtnl_link_stats *a,
@@ -826,7 +822,6 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
 	if (tb[IFLA_BROADCAST]) {
 		nla_memcpy(dev->broadcast, tb[IFLA_BROADCAST], dev->addr_len);
 		send_addr_notify = 1;
-		modified = 1;
 	}
 
 	if (ifm->ifi_flags || ifm->ifi_change) {
@@ -839,23 +834,16 @@ static int do_setlink(struct net_device *dev, struct ifinfomsg *ifm,
 		dev_change_flags(dev, flags);
 	}
 
-	if (tb[IFLA_TXQLEN]) {
-		if (dev->tx_queue_len != nla_get_u32(tb[IFLA_TXQLEN])) {
-			dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]);
-			modified = 1;
-		}
-	}
+	if (tb[IFLA_TXQLEN])
+		dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]);
 
 	if (tb[IFLA_OPERSTATE])
-		modified |= set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]), false);
+		set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]));
 
 	if (tb[IFLA_LINKMODE]) {
-		if (dev->link_mode != nla_get_u8(tb[IFLA_LINKMODE])) {
-			write_lock_bh(&dev_base_lock);
-			dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]);
-			write_lock_bh(&dev_base_lock);
-			modified = 1;
-		}
+		write_lock_bh(&dev_base_lock);
+		dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]);
+		write_unlock_bh(&dev_base_lock);
 	}
 
 	err = 0;
@@ -869,10 +857,6 @@ errout:
 
 	if (send_addr_notify)
 		call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
-
-	if (modified)
-		netdev_state_change(dev);
-
 	return err;
 }
 
@@ -990,7 +974,7 @@ struct net_device *rtnl_create_link(struct net *net, char *ifname,
 	if (tb[IFLA_TXQLEN])
 		dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]);
 	if (tb[IFLA_OPERSTATE])
-		set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]), true);
+		set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]));
 	if (tb[IFLA_LINKMODE])
 		dev->link_mode = nla_get_u8(tb[IFLA_LINKMODE]);
 
-- 
1.5.2.4

^ permalink raw reply related

* Re: [BUG] IPv6 recursive locking
From: Benjamin Thery @ 2008-02-17 20:37 UTC (permalink / raw)
  To: Daniel Lezcano; +Cc: Kristof Provost, netdev, davem
In-Reply-To: <47B87D2B.7040400@fr.ibm.com>

On Feb 17, 2008 7:30 PM, Daniel Lezcano <dlezcano@fr.ibm.com> wrote:
> Kristof Provost wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi,
> >
> > I'm running the current git (1309d4e68497184d2fd87e892ddf14076c2bda98)
> > without problems. While I was toying with IPv6 on my local network I managed
> > to completely hang my machine whenever it receives or sends a neighbour
> > sollictation. At least, I think that's the cause. It started as soon as I
> > installed radvd on the router. The included trace seems to point in the same
> > direction.
> >
> > The machine is a Dell Latitude D505 (so x86). Network interfaces are e100 and
> > ipw2200 (firmware not loaded). I'm currently using the e100.
> >
> > I'll try to bisect it but here's the trace already. Let me know if
> > there's anything else you'd like to know.
>
> I think this bug was introduced by the commit:
>
> 69cc64d8d92bf852f933e90c888dfff083bd4fc9
> "[NDISC]: Fix race in generic address resolution".

I confirm this commit is the culprit.
I reported the same bug last Thursday, but it seems I made a mistake: I replied
to the original thread which led to this commit to report it. But as the thread
was a bit old it seems my answer hadn't been noticed.
See http://www.spinics.net/lists/netdev/msg55373.html

The lockup happens very quickly when you have IPv6 configured.
I think we should revert this commit for now.

Benjamin

>
>
>
> > [  124.439831] =============================================
> > [  124.443689] [ INFO: possible recursive locking detected ]
> > [  124.443689] 2.6.25-rc2 #33
> > [  124.443689] ---------------------------------------------
> > [  124.443689] swapper/0 is trying to acquire lock:
> > [  124.443689]  (&n->lock){-+-+}, at: [<c0468d39>] neigh_resolve_output+0x139/0x290
> > [  124.443689]
> > [  124.443689] but task is already holding lock:
> > [  124.443689]  (&n->lock){-+-+}, at: [<c0468ea4>] neigh_timer_handler+0x14/0x280
> > [  124.443689]
> > [  124.443689] other info that might help us debug this:
> > [  124.443689] 1 lock held by swapper/0:
> > [  124.443689]  #0:  (&n->lock){-+-+}, at: [<c0468ea4>] neigh_timer_handler+0x14/0x280
> > [  124.443689]
> > [  124.443689] stack backtrace:
> > [  124.443689] Pid: 0, comm: swapper Not tainted 2.6.25-rc2 #33
> > [  124.443689]  [<c014863a>] __lock_acquire+0xd3a/0xf40
> > [  124.443689]  [<c0137ec8>] __kernel_text_address+0x18/0x30
> > [  124.443689]  [<c01488a0>] lock_acquire+0x60/0x80
> > [  124.443689]  [<c0468d39>] neigh_resolve_output+0x139/0x290
> > [  124.443689]  [<c059287e>] _write_lock_bh+0x2e/0x40
> > [  124.443689]  [<c0468d39>] neigh_resolve_output+0x139/0x290
> > [  124.443689]  [<c0468d39>] neigh_resolve_output+0x139/0x290
> > [  124.443689]  [<c0148805>] __lock_acquire+0xf05/0xf40
> > [  124.443689]  [<c04e1650>] ndisc_dst_alloc+0xe0/0x170
> > [  124.443689]  [<c04d39f4>] ip6_output_finish+0xa4/0x110
> > [  124.443689]  [<c0147a1d>] __lock_acquire+0x11d/0xf40
> > [  124.443689]  [<c04d4759>] ip6_output+0x5b9/0xba0
> > [  124.443689]  [<c0456eb6>] sock_alloc_send_skb+0x176/0x1d0
> > [  124.443689]  [<c04e4eab>] __ndisc_send+0x33b/0x540
> > [  124.443690]  [<c04e4d6e>] __ndisc_send+0x1fe/0x540
> > [  124.443690]  [<c04e5b69>] ndisc_send_ns+0x69/0xa0
> > [  124.443690]  [<c04e6c8e>] ndisc_solicit+0xee/0x1b0
> > [  124.443690]  [<c01472b5>] mark_held_locks+0x35/0x80
> > [  124.443690]  [<c0592c65>] _spin_unlock_irqrestore+0x45/0x60
> > [  124.443690]  [<c01473f9>] trace_hardirqs_on+0x79/0x130
> > [  124.443690]  [<c012f99f>] __mod_timer+0x9f/0xb0
> > [  124.443690]  [<c0468fd3>] neigh_timer_handler+0x143/0x280
> > [  124.443690]  [<c012f2ca>] run_timer_softirq+0x14a/0x1c0
> > [  124.443690]  [<c0468e90>] neigh_timer_handler+0x0/0x280
> > [  124.443690]  [<c0468e90>] neigh_timer_handler+0x0/0x280
> > [  124.443690]  [<c012b4c4>] __do_softirq+0x84/0x100
> > [  124.443690]  [<c012b595>] do_softirq+0x55/0x60
> > [  124.443690]  [<c012b9e5>] irq_exit+0x65/0x80
> > [  124.443690]  [<c01073b0>] do_IRQ+0x40/0x70
> > [  124.443690]  [<c010585e>] common_interrupt+0x2e/0x34
> > [  124.443690]  [<c032007b>] acpi_power_on+0x3b/0x104
> > [  124.443690]  [<c0322af6>] acpi_idle_enter_simple+0x194/0x1fe
> > [  124.443690]  [<c0322727>] acpi_idle_enter_bm+0xc1/0x2fc
> > [  124.443690]  [<c03fff43>] cpuidle_idle_call+0x63/0xb0
> > [  124.443690]  [<c03ffee0>] cpuidle_idle_call+0x0/0xb0
> > [  124.443690]  [<c010380d>] cpu_idle+0x5d/0xf0
> > [  124.443690]  =======================
> >
> > Kristof
> >
> --
>
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply

* Re: [2.6.25-rc2] System freezes ca. 1 minute after logging into KDE
From: Benjamin Thery @ 2008-02-17 20:22 UTC (permalink / raw)
  To: Frans Pop, davem; +Cc: linux-kernel, netdev
In-Reply-To: <200802171139.13615.elendil@planet.nl>

On Feb 17, 2008 11:39 AM, Frans Pop <elendil@planet.nl> wrote:
> (resend a third time because previous attempts never reached the lists
> due to a bug in my MUA; my apologies to David for spamming his inbox)
>
> Linus Torvalds wrote:
> > But hey, you can try to prove me wrong.  I dare you.
> Me too, me too!
>
> Weird issue this.
> About a minute after logging into KDE the system freezes, but only
> partially. The keyboard is completely dead in all cases (no console
> switching, no SysRq), but some tasks stay running. One time music continued
> playing, other times it stopped. One time the desktop clock continued
> ticking, other times it stopped. One time I could close a window using the
> mouse, but other windows were frozen.
> It's not just KDE that's frozen; one time I switched to VT1 before the
> freeze happened, but that became unusable too.
> Zilch in the logs.
>
> I've bisected it down to:
> commit 69cc64d8d92bf852f933e90c888dfff083bd4fc9
> Author: David S. Miller <davem@davemloft.net>
>     [NDISC]: Fix race in generic address resolution
>
> Confirmed that this is really the culprit by reverting this commit on top
> of -rc2, which is now running fine.
>
> I'm using IPv6 (local network only) together with IPv4, use a bridge (br0)
> and have an NFS4 mount active.

I've encountered the same issue last Thursday. Here, I can hang my machine
with ping6. I've also bisected it down to the same commit.

I've sent some kernel traces which shows how the soft lock up occurs. See
thread: "[PATCH][RFC] race in generic address resolution"
http://www.spinics.net/lists/netdev/msg55375.html

Benjamin


>
> Cheers,
> FJP
>
>

^ permalink raw reply

* Re: [PATCH] New device for DM9601 usb net driver
From: Peter Korsgaard @ 2008-02-17 19:36 UTC (permalink / raw)
  To: Robert Brockway; +Cc: jeff, netdev
In-Reply-To: <874pcgy56v.fsf@macbook.be.48ers.dk>

>>>>> "Peter" == Peter Korsgaard <jacmet@sunsite.dk> writes:

>>>>> "Robert" == Robert Brockway <robert@timetraveller.org> writes:
 Robert> Hi Peter.  I've verified that the Hirose USB-100 (0x0a47,
 Robert> 0x9601) is a clone of the DAVICOM DM9601.  I patched dm9601.c
 Robert> to identify this device and now have these in production.
 Robert> Unified diff against 2.6.24 attached.

 Peter> Thanks!

Could you resend with a proper Signed-off-by: line? (you can add my acked-by)

 Peter> Acked-by: Peter Korsgaard <jacmet@sunsite.dk>

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [PATCH] update TULIP MAINTAINERS
From: Grant Grundler @ 2008-02-17 18:53 UTC (permalink / raw)
  To: jgarzik; +Cc: netdev, kyle, akpm

Jeff,
Kyle and I are co-maintaining tulip driver. Normally kyle will review
my patchs and submit them. I'll deal with bugzilla.kernel.org bugs and
try to resolve those bugs.

thanks,
grant

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>

--- linux-2.6.24.1/MAINTAINERS-ORIG	2008-02-17 10:33:52.000000000 -0800
+++ linux-2.6.24.1/MAINTAINERS	2008-02-17 10:47:01.000000000 -0800
@@ -3776,10 +3776,13 @@
 W:	http://www.auk.cx/tms380tr/
 S:	Maintained
 
-TULIP NETWORK DRIVER
-L:	tulip-users@lists.sourceforge.net
-W:	http://sourceforge.net/projects/tulip/
-S:	Orphan
+TULIP NETWORK DRIVERS
+P:	Grant Grundler
+M:	grundler@parisc-linux.org
+P:	Kyle McMartin
+M:	kyle@parisc-linux.org
+L:	netdev@vger.kernel.org
+S:	Maintained
 
 TUN/TAP driver
 P:	Maxim Krasnyansky

^ permalink raw reply

* Re: [BUG] IPv6 recursive locking
From: Daniel Lezcano @ 2008-02-17 18:30 UTC (permalink / raw)
  To: Kristof Provost; +Cc: netdev
In-Reply-To: <20080217141229.GB1677@nereid>

Kristof Provost wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> I'm running the current git (1309d4e68497184d2fd87e892ddf14076c2bda98) 
> without problems. While I was toying with IPv6 on my local network I managed 
> to completely hang my machine whenever it receives or sends a neighbour
> sollictation. At least, I think that's the cause. It started as soon as I 
> installed radvd on the router. The included trace seems to point in the same
> direction.
> 
> The machine is a Dell Latitude D505 (so x86). Network interfaces are e100 and
> ipw2200 (firmware not loaded). I'm currently using the e100.
> 
> I'll try to bisect it but here's the trace already. Let me know if
> there's anything else you'd like to know.

I think this bug was introduced by the commit:

69cc64d8d92bf852f933e90c888dfff083bd4fc9
"[NDISC]: Fix race in generic address resolution".


> [  124.439831] =============================================
> [  124.443689] [ INFO: possible recursive locking detected ]
> [  124.443689] 2.6.25-rc2 #33
> [  124.443689] ---------------------------------------------
> [  124.443689] swapper/0 is trying to acquire lock:
> [  124.443689]  (&n->lock){-+-+}, at: [<c0468d39>] neigh_resolve_output+0x139/0x290
> [  124.443689]
> [  124.443689] but task is already holding lock:
> [  124.443689]  (&n->lock){-+-+}, at: [<c0468ea4>] neigh_timer_handler+0x14/0x280
> [  124.443689]
> [  124.443689] other info that might help us debug this:
> [  124.443689] 1 lock held by swapper/0:
> [  124.443689]  #0:  (&n->lock){-+-+}, at: [<c0468ea4>] neigh_timer_handler+0x14/0x280
> [  124.443689]
> [  124.443689] stack backtrace:
> [  124.443689] Pid: 0, comm: swapper Not tainted 2.6.25-rc2 #33
> [  124.443689]  [<c014863a>] __lock_acquire+0xd3a/0xf40
> [  124.443689]  [<c0137ec8>] __kernel_text_address+0x18/0x30
> [  124.443689]  [<c01488a0>] lock_acquire+0x60/0x80
> [  124.443689]  [<c0468d39>] neigh_resolve_output+0x139/0x290
> [  124.443689]  [<c059287e>] _write_lock_bh+0x2e/0x40
> [  124.443689]  [<c0468d39>] neigh_resolve_output+0x139/0x290
> [  124.443689]  [<c0468d39>] neigh_resolve_output+0x139/0x290
> [  124.443689]  [<c0148805>] __lock_acquire+0xf05/0xf40
> [  124.443689]  [<c04e1650>] ndisc_dst_alloc+0xe0/0x170
> [  124.443689]  [<c04d39f4>] ip6_output_finish+0xa4/0x110
> [  124.443689]  [<c0147a1d>] __lock_acquire+0x11d/0xf40
> [  124.443689]  [<c04d4759>] ip6_output+0x5b9/0xba0
> [  124.443689]  [<c0456eb6>] sock_alloc_send_skb+0x176/0x1d0
> [  124.443689]  [<c04e4eab>] __ndisc_send+0x33b/0x540
> [  124.443690]  [<c04e4d6e>] __ndisc_send+0x1fe/0x540
> [  124.443690]  [<c04e5b69>] ndisc_send_ns+0x69/0xa0
> [  124.443690]  [<c04e6c8e>] ndisc_solicit+0xee/0x1b0
> [  124.443690]  [<c01472b5>] mark_held_locks+0x35/0x80
> [  124.443690]  [<c0592c65>] _spin_unlock_irqrestore+0x45/0x60
> [  124.443690]  [<c01473f9>] trace_hardirqs_on+0x79/0x130
> [  124.443690]  [<c012f99f>] __mod_timer+0x9f/0xb0
> [  124.443690]  [<c0468fd3>] neigh_timer_handler+0x143/0x280
> [  124.443690]  [<c012f2ca>] run_timer_softirq+0x14a/0x1c0
> [  124.443690]  [<c0468e90>] neigh_timer_handler+0x0/0x280
> [  124.443690]  [<c0468e90>] neigh_timer_handler+0x0/0x280
> [  124.443690]  [<c012b4c4>] __do_softirq+0x84/0x100
> [  124.443690]  [<c012b595>] do_softirq+0x55/0x60
> [  124.443690]  [<c012b9e5>] irq_exit+0x65/0x80
> [  124.443690]  [<c01073b0>] do_IRQ+0x40/0x70
> [  124.443690]  [<c010585e>] common_interrupt+0x2e/0x34
> [  124.443690]  [<c032007b>] acpi_power_on+0x3b/0x104
> [  124.443690]  [<c0322af6>] acpi_idle_enter_simple+0x194/0x1fe
> [  124.443690]  [<c0322727>] acpi_idle_enter_bm+0xc1/0x2fc
> [  124.443690]  [<c03fff43>] cpuidle_idle_call+0x63/0xb0
> [  124.443690]  [<c03ffee0>] cpuidle_idle_call+0x0/0xb0
> [  124.443690]  [<c010380d>] cpu_idle+0x5d/0xf0
> [  124.443690]  =======================
> 
> Kristof
> 

^ permalink raw reply

* [PATCH] [Bug 5839] uli526x partially recognizing interface
From: Grant Grundler @ 2008-02-17 18:30 UTC (permalink / raw)
  To: jgarzik, davem; +Cc: tulip-users, netdev, kyle, akpm

Patch fixes:
    http://bugzilla.kernel.org/show_bug.cgi?id=5839

Init sequence needs to poll phy until phy reset is complete. This is the
same problem that I fixed in 2002 in tulip driver.

Thanks to manty@manty.net for testing this patch.
Thanks to Pozsar Balazs <pozsy@uhulinux.hu> for posting/testing
a similar patch before:
    http://lkml.org/lkml/2006/8/21/45

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>


diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c
index ca2548e..1dd8485 100644
--- a/drivers/net/tulip/uli526x.c
+++ b/drivers/net/tulip/uli526x.c
@@ -484,9 +484,11 @@ static void uli526x_init(struct net_device *dev)
 	struct uli526x_board_info *db = netdev_priv(dev);
 	unsigned long ioaddr = db->ioaddr;
 	u8	phy_tmp;
+	u8	timeout;
 	u16	phy_value;
 	u16 phy_reg_reset;
 
+
 	ULI526X_DBUG(0, "uli526x_init()", 0);
 
 	/* Reset M526x MAC controller */
@@ -511,11 +513,19 @@ static void uli526x_init(struct net_device *dev)
 	/* Parser SROM and media mode */
 	db->media_mode = uli526x_media_mode;
 
-	/* Phyxcer capability setting */
+	/* phyxcer capability setting */
 	phy_reg_reset = phy_read(db->ioaddr, db->phy_addr, 0, db->chip_id);
 	phy_reg_reset = (phy_reg_reset | 0x8000);
 	phy_write(db->ioaddr, db->phy_addr, 0, phy_reg_reset, db->chip_id);
+
+	/* See IEEE 802.3-2002.pdf (Section 2, Chapter "22.2.4 Management
+	 * functions") or phy data sheet for details on phy reset
+	 */
 	udelay(500);
+	timeout = 10;
+	while (timeout-- &&
+		phy_read(db->ioaddr, db->phy_addr, 0, db->chip_id) & 0x8000)
+			udelay(100);
 
 	/* Process Phyxcer Media Mode */
 	uli526x_set_phyxcer(db);


^ permalink raw reply related

* Re: [PATHCH 1/16]  ServerEngines 10Gb NIC driver
From: Stephen Hemminger @ 2008-02-17 17:44 UTC (permalink / raw)
  To: netdev
In-Reply-To: <20080217023031.f9fe8e69@mailhost.serverengines.com>

Do all vendor drivers have to come in with the same mistakes.
Where is the vendor driver ugly school, and how can the Linux
developers teach there?

Run this through checkpatch script or just read some of the
things that a quick scan shows.


diff -uprN orig/linux-2.6.24.2/drivers/net/benet/be.h benet/linux-2.6.24.2/drivers/net/benet/be.h
--- orig/linux-2.6.24.2/drivers/net/benet/be.h	1970-01-01 05:30:00.000000000 +0530
+++ benet/linux-2.6.24.2/drivers/net/benet/be.h	2008-02-14 15:23:07.787208928 +0530
@@ -0,0 +1,373 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or at your option any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor
+ * Boston, MA 02110-1301 USA
+ *
+ *
+ * The full GNU General Public License is included in this distribution
+ * in the file called GPL.
+ *
+ * Contact Information:
+ * linux-drivers@serverengines.com
+ *
+ * ServerEngines
+ * 209 N. Fair Oaks Ave
+ * Sunnyvale, CA 94085
+ *
+ */
+#ifndef _BE_H
+#define _BE_H
+
+#include <linux/netdevice.h>
+#include "bni.h"
+
+typedef union _PHYSICAL_ADDRESS {
+	struct {
+		u32 pa_lo;
+		u32 pa_hi;
+	};
+	u64 pa;
+} PHYSICAL_ADDRESS;

Don't introduce typedef's, and creates byteorder dependency.

+
+#define BE_ETHERNET_FCS_SIZE    		4
+#define BE_ENET_HEADER_SIZE     		14
+#define BE_VLAN_HEADER_SIZE     		4
+#define BE_SNAP_HEADER_SIZE     		5
+#define BE_HEADER_ETHERNET_II_802_3_SIZE 	14
+#define BE_HEADER_802_2_SIZE    		3
+#define BE_MIN_ETHER_FRAME_SIZE 		64
+#define BE_MIN_SUPPORT_FRAME_SIZE 		256
+#define BE_MAX_JUMBO_FRAME_SIZE 		9000
+#define BE_MAXIMUM_ETHERNET_FRAME_SIZE  	1518	/*With FCS */

Don't define your own constants use values in if_ether.h

+extern unsigned int dbg_mask;
+extern unsigned int pm_resume;

These shouldn't be global, and risk namespace conflict.

+extern char be_drvr_ver[];
+extern char be_fw_ver[];
+extern char be_driver_name[];

const?

+typedef enum {
+	BE_DEVICE_1,
+	BE_DEVICE_2,
+	MAX_BE_DEVICES
+} BE_DEVICE_NUM;
+
+typedef enum {
+	BE_DEV_STATE_NONE,
+	BE_DEV_STATE_INIT,
+	BE_DEV_STATE_OPEN
+} BE_DEV_STATE;
+
+#define BE_DEV_STATE_OPEN(adapter) (adapter->dev_state == BE_DEV_STATE_OPEN)

Don't use wrapper macro open code.

+/*
+ * BE driver statistics.
+ */
+struct _be_stat {
+	u32 bes_tx_reqs;	/* number of TX requests initiated */
+	u32 bes_tx_fails;	/* number of TX requests that failed */
+	u32 bes_fwd_reqs;	/* number of send reqs through forwarding i/f */
+	u32 bes_tx_wrbs;	/* number of tx WRBs used */
+
+	u32 bes_ints;		/* number of interrupts */
+	u32 bes_polls;		/* number of times NAPI called poll function */
+	u32 bes_events;		/* total evet entries processed */
+	u32 bes_tx_events;	/* number of tx completion events  */
+	u32 bes_ucrx_events;	/* number of ucast rx completion events  */
+	u32 bes_bcrx_events;	/* number of bcast rx completion events  */
+	u32 bes_tx_compl;	/* number of tx completion entries processed */
+	u32 bes_ucrx_compl;	/* number of ucrx completion entries
+				   processed */
+	u32 bes_bcrx_compl;	/* number of bcrx completion entries
+				   processed */
+	u32 bes_ethrx_post_fail;	/* number of ethrx buffer alloc
+					   failures */
+	/*
+	 *
+	 * number of non ether type II frames dropped where
+	 * frame len > length field of Mac Hdr
+	 */
+	u32 bes_802_3_dropped_frames;
+	/*
+	 * number of non ether type II frames malformed where
+	 * in frame len < length field of Mac Hdr
+	 */
+	u32 bes_802_3_malformed_frames;
+	u32 bes_ips;		/*  interrupts / sec */
+	u32 bes_prev_ints;	/* bes_ints at last IPS calculation  */
+	u16 bes_eth_tx_rate;	/*  ETH TX rate - Mb/sec */
+	u16 bes_eth_rx_rate;	/*  ETH RX rate - Mb/sec */
+#ifdef RX_PKT_COALESCE
+	u32 bes_rx_coal;	/* Num pkts coalasced */
+	u32 bes_rx_flush;	/* Num times coalasced */
+#endif
+	u32 bes_link_change_physical;	/*Num of times physical link changed */
+	u32 bes_link_change_virtual;	/*Num of times virtual link changed */
+};

Unless these are per-cpu, computing all this will be be a
cpu hog.

+/* Macro to update RX/TX rates */
+#define UPDATE_RATE(AP, JIF, BYTES, RATE) 				\
+		if ((jiffies - AP->JIF) > 2*(HZ)) { 			\
+			u32 r;						\
+			r = AP->BYTES / ((jiffies-AP->JIF)/(HZ));	\
+			r = (r / 1000000); /* MB/Sec */			\
+			AP->be_stat.RATE = (r * 8); /* Mega Bits/Sec */	\
+			AP->JIF = jiffies;				\
+			AP->BYTES = 0;					\
+		}


This should be an inline function not a macro.

+/*
+ * Every second we look at the ints/sec and adjust eq_delay
+ * between AP->min_eqd and AP->max_eqd to keep the ints/sec between
+ * IPS_HI_WM and IPS_LO_WM.
+ */
+#define IPS_HI_WM	18000
+#define IPS_LO_WM	8000
+#define UPDATE_IPS(AP, NP) 						\
+		if ((jiffies - AP->ips_jiffies) > 1*(HZ)) {		\
+			/* One second elapsed since last update	 */	\
+			u32 r, new_eqd = -1;				\
+			if (AP->be_stat.bes_prev_ints > 		\
+					AP->be_stat.bes_ints) {		\
+				/* interrupt counter wrapped aroud */	\
+				r = (0xFFFFFFFF - 			\
+					AP->be_stat.bes_prev_ints) +	\
+					AP->be_stat.bes_ints;		\
+			}						\
+			else						\
+				r = AP->be_stat.bes_ints - 		\
+					AP->be_stat.bes_prev_ints;	\
+			r =  r / ((jiffies - AP->ips_jiffies)/(HZ));	\
+			AP->be_stat.bes_ips = r;			\
+			AP->ips_jiffies = jiffies;			\
+			AP->be_stat.bes_prev_ints = 			\
+						AP->be_stat.bes_ints;	\
+			if (r > IPS_HI_WM && 				\
+					AP->cur_eqd < AP->max_eqd) {	\
+				/* increase eqdelay by a notch */	\
+				new_eqd = (AP->cur_eqd + 8);		\
+			}						\
+			if (r < IPS_LO_WM && 				\
+					AP->cur_eqd > AP->min_eqd) {	\
+				/* decrease eqdelay by a notch */	\
+				new_eqd = (AP->cur_eqd - 8);		\
+			}						\
+			if (AP->enable_aic && new_eqd != -1) {		\
+				/* program new delay */			\
+				if (bni_change_eqd(NP, new_eqd) == 	\
+						BE_SUCCESS) 		\
+					AP->cur_eqd = new_eqd;		\
+			}						\
+		}

This shouldn't be a ugly macro.


+#define FAIL	1
+#define	SUCCESS	0

No, don't define private true/false.

+#define MAX_EQD				120

What is this value what does it mean?

+/*
+ * timer to prevent system shutdown hang for ever if h/w stops responding
+ */
+typedef struct {
+	atomic_t get_stat_flag;
+	struct timer_list get_stats_timer;
+	unsigned long get_stat_sem;	/* semaphore to wait  */
+} be_timer_ctxt_t;
+
+#ifdef RX_PKT_COALESCE
+#define MAX_COALESCE_SIZE	48*1024
+#define MAX_COALESCE_FRAGS	(MAX_SKB_FRAGS - 1)
+#define MAX_COALESCE_OBJECTS	8
+/* struture to keep track of adjacent packets in a connection that
+ * can be colesced to a larger packet during RX completion processing.
+ */
+struct be_coalesce_object {
+	PBNI_NET_OBJECT pnob;
+	struct sk_buff *skb;
+	unsigned int frag_cnt;
+	unsigned int next_pkt_seq;
+	unsigned int next_ack_seq;
+	unsigned int tcp_timestamp;
+	unsigned int tcp_tsecr;
+	unsigned int tcp_tsval;
+	unsigned short sport;
+	unsigned short dport;
+	unsigned int saddr;
+	unsigned int daddr;
+	unsigned short last_seen_window;
+	unsigned short mss;
+	unsigned short vlant;
+	unsigned short rsvd;
+
+};
+#endif /* RX_PKT_COALESCE */

If this is done in software, it should be done generally, not just
buried in your specific driver.

+/* This structure is the main BladeEngine driver context.  */
+typedef struct _BE_ADAPTER {
+	struct net_device *netdevp;
+	struct _be_stat be_stat;
+	struct net_device_stats benet_stats;
+	u32 num_bars;
+	SA_DEV_BAR_LOCATIONS pci_bars[3];	/* PCI BAR details */
+#ifdef CONFIG_PM
+	u32 pci_state[16];
+#endif

You shouldn't need to do this.

+	SA_DEV sa_device;	/* device object owned by beclib */
+	BE_CHIP_OBJECT chip_object;	/* BEClib chip object  */
+
+	struct tasklet_struct sts_handler;
+	struct timer_list cq_timer;
+	spinlock_t int_lock;
+
+	PIOCTL_ETH_GET_STATISTICS eth_statsp;
+	/*
+	 * This will enable the use of ethtool to enable or disable
+	 * Checksum on Rx pkts to be obeyed or disobeyed.
+	 * If this is TRUE = 1, then whatever is the checksum on the
+	 * Received pkt as per BE, it will be given to the stack.
+	 * Else the stack will re calculate it.
+	 */
+	BOOLEAN rx_csum;
+#ifdef RX_PKT_COALESCE
+	/*
+	 * This will enable the use of ethtool to enable or disable
+	 * Coalese on Rx pkts to be obeyed or disobeyed.
+	 * If this is grater than 0 and less than 16 then coalascing
+	 * is enabled else it is disabled
+	 */
+	u32 max_rx_coal;
+#endif
+	struct pci_dev *pdev;	/* Pointer to OS's PCI dvice */
+
+	spinlock_t txq_lock;
+
+	u32 isr;		/* copy of Intr status reg. */
+
+	u32 port0_link_sts;	/* Port 0 link status */
+	u32 port1_link_sts;	/* port 1 list status */
+	PBE_LINK_STATUS be_link_sts;
+	PBNI_NET_OBJECT net_obj;
+
+	/*  Flags to indicate what to clean up */
+	BOOLEAN tasklet_started;
+	BOOLEAN isr_registered;
+	/*
+	 * adaptive interrupt coalescing (AIC) related
+	 */
+	u16 enable_aic;		/* 1 if AIC is enabled */
+	u16 min_eqd;		/* minimum EQ delay in usec */
+	u16 max_eqd;		/* minimum EQ delay in usec */
+	u16 cur_eqd;		/* current EQ delay in usec */
+	/*
+	 * book keeping for interrupt / sec and TX/RX rate calculation
+	 */
+	ulong ips_jiffies;	/* jiffies at last IPS calc */
+	u32 eth_tx_bytes;
+	ulong eth_tx_jiffies;
+	u32 eth_rx_bytes;
+	ulong eth_rx_jiffies;
+
+	struct semaphore get_eth_stat_sem;
+	be_timer_ctxt_t *ctxt;	/* context for get stats timer */
+
+#define BE_MAX_MSIX_VECTORS             32
+#define BE_MAX_REQ_MSIX_VECTORS         1
+	struct msix_entry msix_entries[BE_MAX_MSIX_VECTORS];
+	BOOLEAN msix_enabled;	/*MSI has been enabled */
+	BOOLEAN dma_64bit_cap;	/* is the Device DAC capable */
+	int be_fw_ver;		/* BE F/W version */
+	BOOLEAN dev_state;	/* The current state of the device */
+
+} BE_ADAPTER, *PBE_ADAPTER;
+
+extern PBE_ADAPTER be_adapter[MAX_BE_DEVICES];
+
+typedef struct be_rx_page_info {
+	struct page *page;
+	dma_addr_t bus;
+	u16 page_offset;
+} BE_RX_PAGE_INFO;
+
+/*
+ * linux_net_object is an extension to BNI's NetObject structure.
+ * NetObject has a pointer to this structure
+ */
+typedef struct {
+	PVOID os_handle;	/* Context info for VMM */
+	BNI_RECV_BUFFER eth_rx_bufs[256];	/* to pass Rx buffer
+						   addresses */
+	PBE_ADAPTER adapter;	/* Pointer to OSM adapter */
+	u32 devno;		/* OSM, network dev no. */
+	u32 use_port;		/* Current active port */
+	BE_RX_PAGE_INFO *rx_page_info;	/* Array of Rx buf pages */
+	u32 rx_pg_info_hd;	/* Head of queue */
+	int rxbuf_post_fail;	/* RxBuff posting fail count */
+	BOOLEAN rx_pg_shared;	/* Is an allocsted page shared as two frags ? */
+	struct vlan_group *vlan_grp;
+	u32 num_vlans;		/* Number of vlans in BE's filter */
+	u16 vlan_tag[BE_NUM_VLAN_SUPPORTED]; /* vlans currently configured */
+#ifdef CONFIG_BENET_NAPI
+	struct napi_struct napi;
+	u32 work_quota;		/* Max RX packets to process */
+	BOOLEAN rx_sched;
+	spinlock_t rx_lock;
+#endif
+#ifdef RX_PKT_COALESCE
+	struct be_coalesce_object rxc_obj[MAX_COALESCE_OBJECTS];
+	u32 num_coalesce_objects;
+#endif
+} linux_net_object_t;

NO NO typedef, got it.

+/* convenience macro to access members in Linux extension of NetObject */
+#define OSM_NOB(x)	((linux_net_object_t *) (x)->osm_netobj)

Gack, no.

+/* proto declarations */
+
+int benet_probe(struct net_device *netdev);
+void be_set_ethtool_ops(struct net_device *netdev);
+int be_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr);
+struct net_device_stats *benet_get_stats(struct net_device *);
+
+int be_prepare_interface(PBE_ADAPTER adapter);
+void cleanup_netobject(PBNI_NET_OBJECT);
+void osm_process_sts(unsigned long context);
+irqreturn_t be_int(int irq, PVOID dev, struct pt_regs *regs);
+
+int betx_ether_frame(PBE_ADAPTER pBeAdapter, PBNI_NET_OBJECT NetObject,
+		     struct sk_buff *skb, u8 proto, u8 forward,
+		     u16 lso_mss);
+
+void post_eth_rx_buffs(PBNI_NET_OBJECT NetObject);
+void get_stat_cb(PVOID context, BESTATUS status, MCC_WRB *optional_wrb);
+
+void get_stats_timer_handler(unsigned long context);
+
+void enable_eq_intr(PBNI_NET_OBJECT pnob);
+void disable_eq_intr(PBNI_NET_OBJECT pnob);
+
+void wait_nic_tx_cmpl(PBNI_NET_OBJECT pnob);
+void be_print_link_info(PBE_LINK_STATUS lnk_status);
+void be_update_link_status(PBE_ADAPTER adapter);
+
+void be_init_procfs(PBE_ADAPTER adapter);
+void be_cleanup_procfs(PBE_ADAPTER adapter);
+
+#ifdef CONFIG_BENET_NAPI
+int be_poll(struct napi_struct *napi, int budget);
+#endif
+#endif /* _BE_H */
diff -uprN orig/linux-2.6.24.2/drivers/net/benet/bni.h benet/linux-2.6.24.2/drivers/net/benet/bni.h
--- orig/linux-2.6.24.2/drivers/net/benet/bni.h	1970-01-01 05:30:00.000000000 +0530
+++ benet/linux-2.6.24.2/drivers/net/benet/bni.h	2008-02-14 15:23:07.788208776 +0530
@@ -0,0 +1,261 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or at your option any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor
+ * Boston, MA 02110-1301 USA
+ *
+ *
+ * The full GNU General Public License is included in this distribution
+ * in the file called GPL.
+ *
+ * Contact Information:
+ * linux-drivers@serverengines.com
+ *
+ * ServerEngines
+ * 209 N. Fair Oaks Ave
+ * Sunnyvale, CA 94085
+ *
+ */
+/*
+
+@file
+    bni.h
+
+@brief
+    Definitions and macros that are required for all .c files
+    that use the BNI API and implement the BNI API functions
+*/
+#ifndef _BNI_H
+#define _BNI_H
+
+#define _SA_MODULE_NAME "net-driver"
+#include "beclib_ll.h"
+
+#define VLAN_VALID_BIT		0x8000
+#define BE_NUM_VLAN_SUPPORTED	32
+#define BE_PORT_LINK_DOWN       0000
+#define BE_PORT_LINK_UP         0001
+
+typedef unsigned char BOOLEAN;
+
+#define TOU32(_struct_) *((u32 *)(&(_struct_)))
+
+/*
+ * DLs used by the Network driver. 0x00000000 to 0x00000800 are used
+ * by SA/BECLIB
+ */
+typedef enum _NETD_DEBUG_LEVELS {
+	DL_ERROR = DL_ERR,
+	DL_EVENT = 0x00001000,
+	DL_CQ = 0x00002000,
+	DL_SEND = 0x00004000,
+	DL_RECV = 0x00008000,
+	DL_WINDOW = 0x00010000,
+	DL_OFFLOAD = 0x00020000,
+	DL_UPLOAD = 0x00040000,
+	DL_VLAN = 0x00080000,
+	DL_IPSEC = 0x00100000,
+	DL_INT = 0x00200000,
+	DL_PNP = 0x00400000,
+	DL_ETH_INFO = 0x00800000,
+	DL_TIMER = 0x01000000,
+	DL_INIT = 0x02000000,
+	DL_SHUTDOWN = 0x04000000,
+} NET_DEBUG_LEVELS;
+
+/*
+ * Structure to return Ethernet statistics counters maintained by BE.
+ * Defined in srcgen.
+ */
+typedef BE_RXF_STATS BLADE_ETH_STATS, *PBLADE_ETH_STATS;
+
+/*
+@brief
+    This structure is used by the OSM driver to give BNI
+    physical fragments to use for DMAing data from NIC.
+*/
+typedef struct _BNI_RECV_BUFFER {
+	SA_LIST_ENTRY rxb_list;	/* for maintaining a linked list */
+	PVOID rxb_va;		/* buffer virtual address */
+	u32 rxb_pa_lo;		/* low part of physical address */
+	u32 rxb_pa_hi;		/* high part of physical address */
+	u32 rxb_len;		/* length of recv buffer */
+	PVOID rxb_ctxt;		/* context for OSM driver to use */
+} BNI_RECV_BUFFER, *PBNI_RECV_BUFFER;
+
+/*
+ * fragment list to describe scattered data.
+ */
+typedef struct _BNI_TX_FRAG_LIST {
+	u32 txb_len;		/* Size of this fragment */
+	u32 txb_pa_lo;		/* Lower 32 bits of 64 bit physical addr */
+	u32 txb_pa_hi;		/* Higher 32 bits of 64 bit physical addr */
+} BNI_TX_FRAG_LIST, *PBNI_TX_FRAG_LIST;
+/*
+ * maximum fragements in a TX request
+ */
+#define	BE_MAX_TX_FRAG_COUNT		(30)
+
+/*
+ * Flag bits for send operation
+ */
+#define IPCS            (1 << 0)	/* Enable IP checksum offload */
+#define UDPCS           (1 << 1)	/* Enable UDP checksum offload */
+#define TCPCS           (1 << 2)	/* Enable TCP checksum offload */
+#define LSO             (1 << 3)	/* Enable Large Segment  offload */
+#define ETHVLAN         (1 << 4)	/* Enable VLAN insert */
+#define ETHEVENT        (1 << 5)	/* Generate  event on completion */
+#define ETHCOMPLETE     (1 << 6)	/* Generate completion when done */
+#define IPSEC           (1 << 7)	/* Enable IPSEC */
+#define FORWARD         (1 << 8)	/* Send the packet in forwarding path */
+#define FIN             (1 << 9)	/* Issue FIN segment */
+
+/* @brief
+ *  This structure is the main tracking structure for a NIC interface.
+ *  This data structure contains OS agnostic data members for processing
+ *  intialization, sends, receives, and asynchronous events from the
+ *  BladeEngine network function. The OSM driver makes
+ *  calls into functions defined at this layer for initialization,
+ *  eumeration and population of physical fragments with per-packet
+ *  control flags for send and receive operations, population of
+ *  receive buffers for NIC , and handling asynchronous
+ *  events (such as link status change, packet pattern recognition etc.).
+ */
+typedef struct _BNI_NET_OBJECT {
+
+	/*
+	 * MCC Ring - used to send ioctl cmds to embedded ARM processor
+	 */
+	PMCC_WRB mcc_q;			/* VA of the start of the ring */
+	u32 mcc_q_len;			/* # of WRB entries in this ring */
+	u32 mcc_q_hd;			/* MCC ring head */
+	u8 mcc_q_created;		/* flag to help cleanup */
+	u8 mcc_q_pages;			/* Num of pages allocacted by OSM */
+	BE_MCC_OBJECT mcc_q_obj;	/* BECLIB's MCC ring Object */
+	SA_PHYSICAL_ADDRESS mcc_q_pa;	/* Physical address in LE order */
+	/*
+	 * MCC Completion Ring - ARM's responses to ioctls sent from MCC ring
+	 */
+	PMCC_CQ_ENTRY mcc_cq;		/* VA of the start of the ring */
+	u32 mcc_cq_len;			/* # of compl. entries in this ring */
+	u32 mcc_cq_tl;			/* compl. ring tail */
+	u8 mcc_cq_created;		/* flag to help cleanup */
+	u8 mcc_cq_pages;		/* Num of pages allocacted by OSM */
+	BE_CQ_OBJECT mcc_cq_obj;	/* BECLIB's MCC compl. ring object */
+	u32 mcc_cq_id;			/* MCC ring ID */
+	SA_PHYSICAL_ADDRESS mcc_cq_pa;	/* Physical address in LE order */
+	/*
+	 * BEClib uses an array of context objects to track outstanding
+	 * requests to the MCC.  We need allocate the same number of
+	 * conext entries as the number of entries in the MCC WRB ring
+	 */
+	u8 mcc_wrb_ctxt_pages;		/* Num of pages allocacted by OSM */
+	PVOID mcc_wrb_ctxt;		/* pointer to the context area */
+	u32 mcc_wrb_ctxtLen;		/* Number of entries in the context */
+	/*
+	 * NIC send request ring - used for xmitting raw ether frames.
+	 */
+	PETH_WRB tx_q;			/* VA of the start of the ring */
+	u32 tx_q_len;			/* # if entries in the send ring */
+	u32 tx_q_hd;			/* Head index. Next req. goes here */
+	u32 tx_q_tl;			/* Tail indx. oldest outstanding req. */
+	u8 tx_q_created;		/* flag to help cleanup */
+	u8 tx_q_pages;			/* Num of pages allocacted by OSM */
+	BE_ETHSQ_OBJECT tx_q_obj;	/* BECLIB's send Q handle */
+	SA_PHYSICAL_ADDRESS tx_q_pa;	/* Physical address in LE order */
+	u32 tx_q_id;			/* send queue ring ID */
+	u32 tx_q_port;			/* 0 no binding, 1 port A,  2 port B */
+
+	u32 tx_q_used;			/* # of WRBs used */
+	/* ptr to an array in which we store context info for each send req. */
+	PVOID *tx_ctxt;
+	/*
+	 * NIC Send compl. ring - completion status for all NIC frames xmitted.
+	 */
+	PETH_TX_COMPL tx_cq;		/* VA of start of the ring */
+	u32 txcq_len;			/* # of entries in the ring */
+	/*
+	 * index into compl ring where the host expects next completion entry
+	 */
+	u32 tx_cq_tl;
+	u32 tx_cq_id;			/* completion queue id */
+	u8 tx_cq_created;		/* flag to help cleanup */
+	u8 tx_cq_pages;			/* Num of pages allocacted by OSM */
+	BE_CQ_OBJECT tx_cq_obj;
+	SA_PHYSICAL_ADDRESS tx_cq_pa;	/* Physical address in LE order */
+	/*
+	 * Event Queue - all completion entries post events here.
+	 */
+	PEQ_ENTRY event_q;		/* VA of start of event queue */
+	u32 event_q_len;		/* # of entries */
+	u32 event_q_tl;			/* Tail of the event queue */
+	u32 event_q_id;			/* Event queue ID */
+	u8 event_q_created;		/* flag to help cleanup */
+	u8 event_q_pages;		/* Num of pages allocacted by OSM */
+	BE_EQ_OBJECT event_q_obj;	/* Queue handle */
+	SA_PHYSICAL_ADDRESS event_q_pa;	/* Physical address in LE order */
+	/*
+	 * NIC receive queue - Data buffers to be used for receiving unicast,
+	 * broadcast and multi-cast frames  are posted here.
+	 */
+	PETH_RX_D rx_q;			/* VA of start of the queue */
+	u32 rx_q_len;			/* # of entries */
+	u32 rx_q_hd;			/* Head of the queue */
+	u32 rx_q_posted;		/* number of posted buffers */
+	u32 rx_q_id;			/* queue ID */
+	u8 rx_q_created;		/* flag to help cleanup */
+	u8 rx_q_pages;			/* Num of pages allocacted by OSM */
+	BE_ETHRQ_OBJECT rx_q_obj;	/* NIC RX queue handle */
+	SA_PHYSICAL_ADDRESS rx_q_pa;	/* Physical address */
+	/*
+	 * Pointer to an array of opaque context object for use by OSM driver
+	 */
+	PVOID *rx_ctxt;
+	/*
+	 * NIC unicast RX completion queue - all unicast ether frame completion
+	 * statuses from BE come here.
+	 */
+	PETH_RX_COMPL ucrx_cq;		/* VA of start of the queue */
+	u32 ucrx_cq_len;		/* # of entries */
+	u32 ucrx_cq_tl;			/* Tail of the queue */
+	u32 ucrx_cq_id;			/* queue ID */
+	u8 ucrx_cq_created;		/* flag to help cleanup */
+	u8 ucrx_cq_pages;		/* Num of pages allocacted by OSM */
+	BE_CQ_OBJECT ucrx_cq_obj;	/* queue handle */
+	SA_PHYSICAL_ADDRESS ucrx_cq_pa;	/* Physical address in LE order */
+	/*
+	 * Broadcast RX completion queue - all broadcast and multicast ether
+	 * completion statues from BE come here.
+	 */
+	PETH_RX_COMPL bcrx_cq;		/* VA of start of queue */
+	u32 bcrx_cq_len;		/* # of entries */
+	u32 bcrx_cq_tl;			/* Tail of the queue */
+	u32 bcrx_cq_id;			/* Queue ID */
+	u8 bcrx_cq_created;		/* flag to help cleanup */
+	u8 bcrx_cq_pages;		/* Num of pages allocacted by OSM */
+	BE_CQ_OBJECT bcrx_cq_obj;	/* queue handle */
+	SA_PHYSICAL_ADDRESS bcrx_cq_pa;	/* Physical address in LE order */
+
+	BE_FUNCTION_OBJECT fn_obj;	/* function object   */
+	u32 rx_buf_size;		/* Size of the RX buffers */
+	u8 mac_address[6];		/* MAC address */
+	/*
+	 * OSM handle. OSM drivers can use this pointer to extend NetObject.
+	 */
+	PVOID osm_netobj;
+	SA_SGL mb_sgl;			/* SGL for MCC_MAIL_BOX */
+	PVOID mb_ptr;			/* mailbox ptr to be freed  */
+} BNI_NET_OBJECT, *PBNI_NET_OBJECT;

Even better a pointer typedef, double ugly.

+/*
+ * convenience macros to access some NetObject members
+ */
+#define NET_FH(np)       (&(np)->fn_obj)
+
+/*
+ * Functions to advance the head and tail in various rings.
+ */
+static INLINE void bni_adv_eq_tl(PBNI_NET_OBJECT pnob)
+{
+	pnob->event_q_tl = (pnob->event_q_tl + 1) % pnob->event_q_len;
+}

You know divide's are expensive.

+static INLINE void bni_adv_txq_hd(PBNI_NET_OBJECT pnob)
+{
+	pnob->tx_q_hd = (pnob->tx_q_hd + 1) % pnob->tx_q_len;
+}
+
+static INLINE void bni_adv_txq_tl(PBNI_NET_OBJECT pnob)
+{
+	pnob->tx_q_tl = (pnob->tx_q_tl + 1) % pnob->tx_q_len;
+}
+
+static INLINE void bni_adv_txcq_tl(PBNI_NET_OBJECT pnob)
+{
+	pnob->tx_cq_tl = (pnob->tx_cq_tl + 1) % pnob->txcq_len;
+}
+
+static INLINE void bni_adv_rxq_hd(PBNI_NET_OBJECT pnob)
+{
+	pnob->rx_q_hd = (pnob->rx_q_hd + 1) % pnob->rx_q_len;
+}
+
+static INLINE void bni_adv_ucrxcq_tl(PBNI_NET_OBJECT pnob)
+{
+	pnob->ucrx_cq_tl = (pnob->ucrx_cq_tl + 1) % pnob->ucrx_cq_len;
+}
+
+static INLINE void bni_adv_bcrxcq_tl(PBNI_NET_OBJECT pnob)
+{
+	pnob->bcrx_cq_tl = (pnob->bcrx_cq_tl + 1) % pnob->bcrx_cq_len;
+}
+
+static INLINE BESTATUS bni_process_mcc_cmpl(BE_MCC_OBJECT *pMccObj)
+{
+	return (be_mcc_process_cq(pMccObj, 1));
+}
+
+/* forward declarations of function prototypes */
+BESTATUS bni_init(PBE_CHIP_OBJECT);
+BESTATUS bni_create_mcc_rings(PBNI_NET_OBJECT pnob);
+extern void bni_destroy_netobj(PBNI_NET_OBJECT, SA_DEV *);
+void bni_cleanup(PBE_CHIP_OBJECT chipobj);
+
+BESTATUS bni_create_netobj(PBNI_NET_OBJECT, SA_DEV_BAR_LOCATIONS *, u32,
+			   SA_DEV *, PBE_CHIP_OBJECT);
+
+BESTATUS bni_tx_pkt(PBNI_NET_OBJECT, PBNI_TX_FRAG_LIST, u32,
+		    u32, u32, void *, u32);
+void bni_start_tx(PBNI_NET_OBJECT, u32);
+
+u32 bni_post_rx_buffs(PBNI_NET_OBJECT, PSA_LIST_ENTRY);
+BESTATUS bni_change_eqd(PBNI_NET_OBJECT, u32);
+
+PETH_TX_COMPL bni_get_tx_cmpl(PBNI_NET_OBJECT);
+PETH_RX_COMPL bni_get_ucrx_cmpl(PBNI_NET_OBJECT);
+PETH_RX_COMPL bni_get_bcrx_cmpl(PBNI_NET_OBJECT);
+void bni_notify_cmpl(PBNI_NET_OBJECT, int, int, int);
+
+void bni_enable_intr(PBNI_NET_OBJECT);
+void bni_enable_eq_intr(PBNI_NET_OBJECT);
+void bni_disable_intr(PBNI_NET_OBJECT);
+void bni_disable_eq_intr(PBNI_NET_OBJECT);
+
+u32 bni_get_isr(PBNI_NET_OBJECT);
+
+PEQ_ENTRY bni_get_event(PBNI_NET_OBJECT);
+void bni_notify_event(PBNI_NET_OBJECT, int, int);
+
+BESTATUS bni_get_uc_mac_adrr(PBNI_NET_OBJECT, u8, u8, u8 Pd,
+			     PSA_MAC_ADDRESS macAddr,
+			     MCC_WRB_CQE_CALLBACK cbf, PVOID cbc);
+
+BESTATUS bni_set_uc_mac_adr(PBNI_NET_OBJECT, u8, u8, u8 Pd,
+			    PSA_MAC_ADDRESS macAddr,
+			    MCC_WRB_CQE_CALLBACK cbf, PVOID cbc);
+
+BESTATUS bni_set_mc_filter(PBNI_NET_OBJECT pnob, u32 NumMac,
+			   BOOLEAN Promiscuous,
+			   PSA_MAC_ADDRESS macAddr,
+			   MCC_WRB_CQE_CALLBACK cbf, PVOID cbc);
+
+void bni_set_promisc(PBNI_NET_OBJECT pnob);
+void bni_reset_promisc(PBNI_NET_OBJECT pnob);
+BESTATUS bni_config_vlan(PBNI_NET_OBJECT pnob, u16 *VlanId,
+			 u32 numVlans, MCC_WRB_CQE_CALLBACK cbf,
+			 PVOID cbc, BOOLEAN Promiscuous);
+
+BESTATUS bni_get_stats(PBNI_NET_OBJECT pnob,
+		       IOCTL_ETH_GET_STATISTICS *ioctl_va,
+		       u64 ioctl_pa, MCC_WRB_CQE_CALLBACK cbf, PVOID cbc);
+
+BESTATUS bni_get_link_sts(PBNI_NET_OBJECT pnob,
+			  PBE_LINK_STATUS be_link_sts,
+			  MCC_WRB_CQE_CALLBACK cbf, PVOID cbc);
+BESTATUS bni_set_flow_ctll(PBE_FUNCTION_OBJECT pFnObj, boolean txfc_enable,
+			   boolean rxfc_enable);
+BESTATUS bni_get_flow_ctl(PBE_FUNCTION_OBJECT pFnObj,
+			  boolean *txfc_enable, boolean *rxfc_enable);
+u32 bni_process_rx_flush_cmpl(PBNI_NET_OBJECT pnob);
+
+#endif /* #ifndef _BNI_H_ */
diff -uprN orig/linux-2.6.24.2/drivers/net/benet/be_init.c benet/linux-2.6.24.2/drivers/net/benet/be_init.c
--- orig/linux-2.6.24.2/drivers/net/benet/be_init.c	1970-01-01 05:30:00.000000000 +0530
+++ benet/linux-2.6.24.2/drivers/net/benet/be_init.c	2008-02-14 15:29:34.088482208 +0530
@@ -0,0 +1,1426 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or at your option any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor
+ * Boston, MA 02110-1301 USA
+ *
+ *
+ * The full GNU General Public License is included in this distribution
+ * in the file called GPL.
+ *
+ * Contact Information:
+ * linux-drivers@serverengines.com
+ *
+ * ServerEngines
+ * 209 N. Fair Oaks Ave
+ * Sunnyvale, CA 94085
+ *
+ */
+
+#include <linux/pci.h>
+#include <linux/etherdevice.h>
+
+#include "be.h"
+
+#define  DRVR_VERSION  "1.0.688"
+
+static struct pci_device_id be_device_id_table[] = {
+	{0x19a2, 0x0201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+	{0, 0, 0, 0, 0, 0, 0}
+};

Use PCI_DEVICE() and just { 0 }


+
+MODULE_DEVICE_TABLE(pci, be_device_id_table);
+
+MODULE_VERSION(DRVR_VERSION);
+
+#define DRV_DESCRIPTION "ServerEngines BladeEngine Network Driver Version " \
+			DRVR_VERSION

+MODULE_DESCRIPTION(DRV_DESCRIPTION);
+MODULE_AUTHOR("ServerEngines");
+MODULE_LICENSE("GPL");
+
+unsigned int dbg_mask = (DL_ALWAYS | DL_ERR);	/* always show error messages */
+unsigned int msix;		/*By default  */
+unsigned int ls_mss = (60 * 1024);

More exposed global name space

+unsigned int rxbuf_size = 2048;	/*Size of Receive buffers posted  */
+
+module_param(msix, uint, (0 | 1));
+module_param(dbg_mask, uint, (DL_ALWAYS | DL_ERR));
+module_param(rxbuf_size, uint, 0);
+
+MODULE_PARM_DESC(msix, "Use MSI-x interrupts");
+MODULE_PARM_DESC(dbg_mask, "Debug mask");
+MODULE_PARM_DESC(rxbuf_size, "Size of buffers to hold Rx data");
+
+static int be_probe(struct pci_dev *, const struct pci_device_id *);
+static void be_remove(struct pci_dev *);
+
+#ifdef CONFIG_PM
+static void be_pm_cleanup(PBE_ADAPTER, PBNI_NET_OBJECT,
+			  struct net_device *);
+static void be_up(PBE_ADAPTER);
+static int be_resume(struct pci_dev *);
+
+static int be_suspend(struct pci_dev *, pm_message_t);
+#endif
+
+int be_mcc_init(PBE_ADAPTER adapter);
+void be_update_link_status(PBE_ADAPTER adapter);
+void be_link_status_async_callback(PVOID context, u32 event_code,
+				   PVOID event);
+
+char be_drvr_ver[] = DRVR_VERSION;
+char be_fw_ver[32];		/* F/W version filled in by be_probe */
+
+char be_driver_name[] = "benet";
+
+static struct pci_driver be_driver = {
+      name:be_driver_name,
+      id_table:be_device_id_table,
+      probe:be_probe,
+#ifdef CONFIG_PM
+      suspend:be_suspend,
+      resume:be_resume,
+#endif
+      remove:be_remove
+};

Use C99 syntax
    .name = be_driver_name,

+
+/*
+ * Number of entries in each queue.
+ */
+#define EVENT_Q_LEN		1024
+#define ETH_TXQ_LEN		2048
+#define ETH_TXCQ_LEN		1024
+#define ETH_RXQ_LEN		1024	/* Does not support any other value */
+#define ETH_UC_RXCQ_LEN		1024
+#define ETH_BC_RXCQ_LEN		256
+#define MCC_Q_LEN               64	/* total size not to exceed 8 pages */
+#define MCC_CQ_LEN              256
+
+PBE_ADAPTER be_adapter[MAX_BE_DEVICES];

Having a fixed number of adapters is awkward.

+
+/*
+ * Intialize and register a network device for the NetObject.
+ */
+static int init_be_netdev(PBE_ADAPTER adapter, PBNI_NET_OBJECT pnob)
+{
+	struct net_device *netdev;
+	int ret = 0;
+	unsigned char *p;
+
+#ifdef CONFIG_PM
+	if (pm_resume) {
+		bni_set_uc_mac_adr(pnob, 0, 0, 0,
+				   (PSA_MAC_ADDRESS) pnob->mac_address,
+				   NULL, NULL);
+		return 0;
+	}
+#endif
+
+	/*
+	 * Allocate netdev. No private data structure is
+	 * allocated with netdev
+	 */
+	netdev = alloc_etherdev(0);
+	if (netdev == NULL)
+		return -ENOMEM;
+
+	p = (u8 *) (pnob->mac_address);
+	/*
+	 * Get MAC address from receive table
+	 */
+	bni_get_uc_mac_adrr(pnob, 0, 0, OSM_NOB(pnob)->devno,
+		(PSA_MAC_ADDRESS) pnob->mac_address, NULL, NULL);
+
+	memcpy(netdev->dev_addr, pnob->mac_address, 6);
+	netdev->priv = pnob;	/* We use the Net Object as private data */
+	netdev->init = &benet_probe;
+	/*
+	 * Initialize to No Link.  Link will be enabled during
+	 * benet_open() or when physical Link is up
+	 */
+	netif_carrier_off(netdev);
+	netif_stop_queue(netdev);
+
+	strcpy(netdev->name, "eth%d");
+
+	SET_NETDEV_DEV(netdev, &(adapter->pdev->dev));
+	ret = register_netdev(netdev);
+	if (ret != 0) {
+		TRACE(DL_INIT,
+		      "Netdevice registration failed - Errno %d\n", ret);
+		free_netdev(netdev);
+		return (ret);
+	}
+	OSM_NOB(pnob)->os_handle = netdev;
+	return ret;
+}
+
+/* Initialize the pci_info structure for this function */
+static int init_pci_be_function(PBE_ADAPTER adapter, struct pci_dev *pdev)
+{
+	adapter->num_bars = 3;
+	/* CSR */
+	adapter->pci_bars[0].base_pa = pci_resource_start(pdev, 2);
+	adapter->pci_bars[0].base_va =
+	    ioremap_nocache(adapter->pci_bars[0].base_pa,
+			    pci_resource_len(pdev, 2));
+	if (adapter->pci_bars[0].base_va == NULL)
+		return -ENOMEM;
+	adapter->pci_bars[0].length = sizeof(BLADE_ENGINE_CSRMAP);
+	adapter->pci_bars[0].mem_or_io_mapped = SA_MEM_MAPPED;
+	adapter->pci_bars[0].type = SA_BAR_TYPE_CSR;
+
+	/* Door Bell */
+	adapter->pci_bars[1].base_pa = pci_resource_start(pdev, 4);
+	adapter->pci_bars[1].base_va =
+	    ioremap_nocache(adapter->pci_bars[1].base_pa, (128 * 1024));
+	if (adapter->pci_bars[1].base_va == NULL) {
+		iounmap(adapter->pci_bars[0].base_va);
+		return -ENOMEM;
+	}
+	adapter->pci_bars[1].length = sizeof(PROTECTION_DOMAIN_DBMAP);
+	adapter->pci_bars[1].mem_or_io_mapped = SA_MEM_MAPPED;
+	adapter->pci_bars[1].type = SA_BAR_TYPE_PD;
+
+	/* PCI */
+	adapter->pci_bars[2].base_pa = pci_resource_start(pdev, 1);
+	adapter->pci_bars[2].length = pci_resource_len(pdev, 1);
+	adapter->pci_bars[2].base_va =
+	    ioremap_nocache(adapter->pci_bars[2].base_pa,
+			    adapter->pci_bars[2].length);
+	if (adapter->pci_bars[2].base_va == NULL) {
+		iounmap(adapter->pci_bars[0].base_va);
+		iounmap(adapter->pci_bars[1].base_va);
+		return -ENOMEM;
+	}
+	adapter->pci_bars[2].mem_or_io_mapped = SA_MEM_MAPPED;
+	adapter->pci_bars[2].type = SA_BAR_TYPE_PCI;
+
+	adapter->pdev = pdev;
+
+	return 0;
+}
+
+/*
+ * Enable MSIx and return 1 if successful. Else return 0
+ */
+int be_enable_msix(PBE_ADAPTER adapter)
+{
+	unsigned int i, ret;
+
+	if (!msix)
+		return 0;
+
+	adapter->msix_enabled = 1;
+
+	for (i = 0; i < BE_MAX_REQ_MSIX_VECTORS; i++) {
+		adapter->msix_entries[i].entry = i;
+	}
+
+	ret = pci_enable_msix(adapter->pdev,
+			      adapter->msix_entries,
+			      BE_MAX_REQ_MSIX_VECTORS);
+
+	if (ret) {
+		adapter->msix_enabled = 0;
+		return 0;
+	}
+
+	return 1;
+}
+
+/*
+ * Module init entry point. Registers our our device and return.
+ * Our probe will be called if the device is found.
+ */
+
+static int __init be_init_module(void)
+{
+	int ret;
+
+	if ((rxbuf_size != 8192) && (rxbuf_size != 4096)
+	    && (rxbuf_size != 2048)) {
+		printk(KERN_WARNING
+		       "Unsupported receive buffer size (%d) requested\n",
+		       rxbuf_size);
+		printk(KERN_WARNING
+		       "Must be 2048 or 4096. Defaulting to 2048\n");
+		rxbuf_size = 2048;
+	}

COMPILE_BUG_ON??

+	ret = pci_register_driver(&be_driver);
+	TRACE(DL_INIT, "pci_module_init returned %d", ret);
+
+	return ret;
+}
+
+module_init(be_init_module);
+
+/*
+ * be_exit_module - Driver Exit Cleanup Routine
+ */
+static void __exit be_exit_module(void)
+{
+	TRACE(DL_SHUTDOWN, "%s Entry\n", __FUNCTION__);
+
+	pci_unregister_driver(&be_driver);
+}
+
+module_exit(be_exit_module);
+
+/*
+ * Registers ISR for BE. Uses MSIx interrupt if configured and requested.
+ * If not, uses INTx interrupt. Returns 0 for success and -1 for filure.
+ */
+int register_isr(PBE_ADAPTER adapter, PBNI_NET_OBJECT pnob)

Global name conflict

+{
+	int msix_intr, r;
+	struct net_device *netdev = OSM_NOB(pnob)->os_handle;
+	u32 msix_ret = 0;
+
+	netdev->irq = adapter->pdev->irq;
+
+	msix_intr = 0;
+	msix_ret = be_enable_msix(adapter);
+	if (msix_ret) {
+		/* Register MSIx Interrupt handler */
+		r = request_irq(adapter->msix_entries[0].vector,
+				(void *)be_int, IRQF_SHARED,
+				netdev->name, netdev);
+		if (r) {
+			printk(KERN_WARNING
+			       "MSIX Request IRQ failed - Errno %d\n", r);
+		} else {
+			msix_intr = 1;
+			TRACE(DL_INIT, "MSIx IRQ %d for %s\n",
+			      adapter->msix_entries[0].vector,
+			      netdev->name);
+		}
+	}
+	if (msix_intr == 0) {
+		/* request legacy INTx interrupt */
+		r = request_irq(netdev->irq, (void *)be_int,
+				IRQF_SHARED, netdev->name, netdev);
+		if (r) {
+			printk(KERN_ERR
+			       "INTx Request IRQ failed - Errno %d\n", r);
+			return (-1);
+		}
+		TRACE(DL_INIT, "BE: INTx IRQ %d for %s\n",
+		      netdev->irq, netdev->name);
+	}
+	return (0);
+}
+
+/*
+ * This function is called by the PCI sub-system when it finds a PCI
+ * device with dev/vendor IDs that match with one of our devices.
+ * All of the driver initialization is done in this function.
+ */
+static int be_probe(struct pci_dev *pdev,
+		    const struct pci_device_id *pdev_id)
+{
+	int status = 0;
+	PBE_ADAPTER adapter = NULL;
+	u32 r;
+	u32 adapt_num = 0;
+	IOCTL_COMMON_GET_FW_VERSION_RESPONSE_PAYLOAD ioctl_pload;
+	PBNI_NET_OBJECT pnob = NULL;
+
+	TRACE(DL_INFO, "Entering probe");
+	while (adapt_num < MAX_BE_DEVICES) {
+		if (!be_adapter[adapt_num])
+			break;
+		adapt_num++;
+	}
+
+	if (adapt_num == MAX_BE_DEVICES) {
+		printk(KERN_WARNING "Cannot support more than %d BE Adapters",
+		       MAX_BE_DEVICES);
+		return -1;
+	}
+
+	status = pci_enable_device(pdev);
+	if (status) {
+		printk(KERN_ERR "pci_enable_device() for BE adapter %d failed",
+		       adapt_num);
+		return status;
+	}
+
+	status = pci_request_regions(pdev, be_driver_name);
+	if (status)
+		return status;
+
+	pci_set_master(pdev);
+
+	adapter = (PBE_ADAPTER) kmalloc(sizeof(BE_ADAPTER), GFP_KERNEL);
+	if (adapter == NULL) {
+		TRACE(DL_INIT,
+		      "Failed to alloc memory for adapter structure\n");
+		pci_release_regions(pdev);
+		goto err_ret;
+	}
+
+	memset(adapter, 0, sizeof(BE_ADAPTER));
+
+	be_adapter[adapt_num] = adapter;
+	/*
+	 * Adapative interrupt coalescing limits in usecs.
+	 * should be a multiple of 8.
+	 */
+	adapter->enable_aic = 1;
+	adapter->max_eqd = MAX_EQD;
+	adapter->min_eqd = 0;
+	adapter->cur_eqd = 0;	/* start with no EQ delay */
+	r = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
+	if (!r) {
+		/* Device is DAC Capable.  */
+		adapter->dma_64bit_cap = TRUE;
+	} else {
+		adapter->dma_64bit_cap = FALSE;
+		r = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
+		if (r) {
+			printk(KERN_ERR "Could not set PCI DMA Mask\n");
+			return r;
+		}
+	}
+
+	status = init_pci_be_function(adapter, pdev);
+	if (status < 0) {
+		printk(KERN_ERR "Failed to map PCI BARS\n");
+		status = -ENOMEM;
+		goto cleanup1;
+	}
+
+	(void)sa_trace_set_level(dbg_mask);
+
+	r = bni_init(&adapter->chip_object);
+	if (r != 0) {
+		printk("bni_init() failed - Error %d\n", r);
+		goto cleanup1;
+	}
+
+	/* Allocate Memory for getting the Link status */
+	adapter->be_link_sts = (PBE_LINK_STATUS)
+	    kmalloc(sizeof(BE_LINK_STATUS), GFP_KERNEL);
+	if (adapter->be_link_sts == NULL) {
+		printk("Memory allocation for link status buffer failed\n");
+		goto cleanup1;
+	}
+	spin_lock_init(&adapter->txq_lock);
+
+	status = be_prepare_interface(adapter);
+	if (status < 0) {
+		goto cleanup1;
+	}
+	pnob = adapter->net_obj;
+
+	/* if the rx_frag size if 2K, one page is shared as two RX frags */
+	OSM_NOB(pnob)->rx_pg_shared =
+			(pnob->rx_buf_size <= PAGE_SIZE / 2) ? TRUE : FALSE;
+	if (pnob->rx_buf_size != rxbuf_size) {
+		printk(KERN_WARNING
+		       "Could not set Rx buffer size to %d. Using %d\n",
+		       rxbuf_size, pnob->rx_buf_size);
+		rxbuf_size = pnob->rx_buf_size;
+	}
+
+	tasklet_init(&(adapter->sts_handler), osm_process_sts,
+		     (unsigned long)adapter);
+	adapter->tasklet_started = 1;	/* indication to cleanup */
+	spin_lock_init(&(adapter->int_lock));
+
+	if (register_isr(adapter, pnob) != 0)
+		goto cleanup;
+
+	adapter->isr_registered = 1;
+	adapter->rx_csum = 1;	/* enable RX checksum check */
+#ifdef RX_PKT_COALESCE
+	adapter->max_rx_coal = MAX_COALESCE_FRAGS;
+#endif
+
+	/* print the version numbers */
+	memset(&ioctl_pload, 0,
+	       sizeof(IOCTL_COMMON_GET_FW_VERSION_RESPONSE_PAYLOAD));
+	printk(KERN_INFO "BladeEngine Driver version:%s. "
+	       "Copyright ServerEngines, Corporation 2005 - 2008\n",
+		be_drvr_ver);
+	if (be_function_get_fw_version(&pnob->fn_obj, &ioctl_pload, NULL,
+				       NULL) == BE_SUCCESS) {
+		adapter->be_fw_ver =
+		    simple_strtoul(ioctl_pload.firmware_version_string + 4,
+				   NULL, 10);
+		strncpy(be_fw_ver, ioctl_pload.firmware_version_string, 32);
+		printk(KERN_INFO "BladeEngine Firmware Version:%s\n",
+		       ioctl_pload.firmware_version_string);
+	} else {
+		printk(KERN_WARNING "Unable to get BE Firmware Version\n");
+	}
+
+	sema_init(&adapter->get_eth_stat_sem, 0);
+
+	adapter->ctxt = (be_timer_ctxt_t *)
+	    kmalloc(sizeof(be_timer_ctxt_t), GFP_KERNEL);
+
+	init_timer(&adapter->ctxt->get_stats_timer);
+	atomic_set(&adapter->ctxt->get_stat_flag, 0);
+	adapter->ctxt->get_stats_timer.function = &get_stats_timer_handler;
+
+	status = be_mcc_init(adapter);
+	if (status < 0) {
+		goto cleanup;
+	}
+
+	be_update_link_status(adapter);
+
+	/* Register async call back function to handle link status updates */
+	if (be_mcc_add_async_event_callback(&adapter->net_obj->mcc_q_obj,
+			    be_link_status_async_callback,
+					    (PVOID) adapter) != BE_SUCCESS) {
+		printk(KERN_WARNING "add_async_event_callback failed");
+		printk(KERN_WARNING
+		       "Link status changes may not be reflected\n");
+	}
+
+	/* Enable ChipInterrupt and EQ Interrupt */
+	bni_enable_intr(adapter->net_obj);
+	enable_eq_intr(adapter->net_obj);
+	adapter->dev_state = BE_DEV_STATE_INIT;
+	return 0;		/* successful return */
+
+cleanup1:
+	pci_release_regions(pdev);
+	pci_disable_device(pdev);
+	be_adapter[adapt_num] = NULL;
+	kfree(adapter);
+	goto err_ret;
+
+cleanup:
+	be_remove(pdev);
+
+err_ret:
+	printk(KERN_ERR "BladeEngine init failed\n");
+	return -ENOMEM;
+}
+
+/*
+ * Get the current link status and print the status on console
+ */
+void be_update_link_status(PBE_ADAPTER adapter)
+{
+	int status;
+	PBNI_NET_OBJECT pnob = adapter->net_obj;
+
+	status = bni_get_link_sts(pnob, adapter->be_link_sts, NULL, NULL);
+
+	if (status == BE_SUCCESS) {
+		if (adapter->be_link_sts->mac0_speed &&
+		    adapter->be_link_sts->mac0_duplex)
+			adapter->port0_link_sts = BE_PORT_LINK_UP;
+		else
+			adapter->port0_link_sts = BE_PORT_LINK_DOWN;
+
+		if (adapter->be_link_sts->mac1_speed &&
+		    adapter->be_link_sts->mac1_duplex)
+			adapter->port1_link_sts = BE_PORT_LINK_UP;
+		else
+			adapter->port1_link_sts = BE_PORT_LINK_DOWN;
+
+		printk(KERN_INFO "Link Properties for %s:\n",
+		       ((struct net_device *)(OSM_NOB(pnob)->os_handle))->name);
+		be_print_link_info(adapter->be_link_sts);
+		return;
+	}
+	printk(KERN_WARNING "Could not get link status for %s\n",
+	       ((struct net_device *)(OSM_NOB(pnob)->os_handle))->name);
+	return;
+}
+
+/* This function handles async callback for link status */
+void be_link_status_async_callback(PVOID context, u32 event_code,
+				   PVOID event)
+{
+	ASYNC_EVENT_LINK_STATE *link_status = (ASYNC_EVENT_LINK_STATE *) event;
+	PBE_ADAPTER adapter = (PBE_ADAPTER) context;
+	BOOLEAN link_enable = FALSE;
+	PBNI_NET_OBJECT pnob;
+	ASYNC_EVENT_TRAILER *async_trailer;
+	struct net_device *netdev;
+
+	if (event_code != ASYNC_EVENT_CODE_LINK_STATE) {
+		/* Not our event to handle */
+		return;
+	}
+	async_trailer = (ASYNC_EVENT_TRAILER *) ((u8 *) event +
+			 sizeof(MCC_CQ_ENTRY) - sizeof (ASYNC_EVENT_TRAILER));
+
+	SA_ASSERT(async_trailer->event_code == ASYNC_EVENT_CODE_LINK_STATE);
+
+	pnob = adapter->net_obj;
+	SA_ASSERT(pnob);
+	netdev = (struct net_device *)OSM_NOB(pnob)->os_handle;
+	SA_ASSERT(netdev);
+
+	/* Determine if this event is a switch VLD or a physical link event */
+	if (async_trailer->event_type == NTWK_LINK_TYPE_VIRTUAL) {
+		adapter->be_stat.bes_link_change_virtual++;
+		if (adapter->be_link_sts->active_port !=
+		    link_status->active_port) {
+			printk("Active port changed due to VLD on switch\n");
+		} else {
+			/* Link of atleast one of the ports changed */
+			printk("Link status update\n");
+		}
+
+	} else {
+		adapter->be_stat.bes_link_change_physical++;
+		if (adapter->be_link_sts->active_port !=
+				link_status->active_port) {
+			printk("Active port changed due to port link status"
+				" change\n");
+		} else {
+			/* Link of atleast one of the ports changed */
+			printk("Link status update\n");
+		}
+	}
+
+	/* Clear memory of adapter->be_link_sts */
+	memset(adapter->be_link_sts, 0, sizeof(adapter->be_link_sts));
+
+	if ((link_status->port0_link_status == ASYNC_EVENT_LINK_UP) ||
+	    (link_status->port1_link_status == ASYNC_EVENT_LINK_UP)) {
+		if ((adapter->port0_link_sts == BE_PORT_LINK_DOWN) &&
+		    (adapter->port1_link_sts == BE_PORT_LINK_DOWN)) {
+			/*
+			 * Earlier both the ports are down
+			 * So link is up
+			 */
+			link_enable = TRUE;
+		}
+
+		if (link_status->port0_link_status == ASYNC_EVENT_LINK_UP) {
+			adapter->port0_link_sts = BE_PORT_LINK_UP;
+			adapter->be_link_sts->mac0_duplex =
+			    link_status->port0_duplex;
+			adapter->be_link_sts->mac0_speed =
+			    link_status->port0_speed;
+			if (link_status->active_port == NTWK_PORT_A)
+				adapter->be_link_sts->active_port = 0;
+		} else
+			adapter->port0_link_sts = BE_PORT_LINK_DOWN;
+
+		if (link_status->port1_link_status == ASYNC_EVENT_LINK_UP) {
+			adapter->port1_link_sts = BE_PORT_LINK_UP;
+			adapter->be_link_sts->mac1_duplex =
+			    link_status->port1_duplex;
+			adapter->be_link_sts->mac1_speed =
+			    link_status->port1_speed;
+			if (link_status->active_port == NTWK_PORT_B)
+				adapter->be_link_sts->active_port = 1;
+		} else
+			adapter->port1_link_sts = BE_PORT_LINK_DOWN;
+
+		printk(KERN_INFO "Link Properties for %s:\n", netdev->name);
+		be_print_link_info(adapter->be_link_sts);
+
+		if (!link_enable)
+			return;
+		/*
+		 * Both ports were down previously, but atleast one of
+		 * them has come up if this netdevice's carrier is not up,
+		 * then indicate to stack
+		 */
+		if (!netif_carrier_ok(netdev)) {
+			netif_start_queue(netdev);
+			netif_carrier_on(netdev);
+		}
+		return;
+	}
+
+	/* Now both the ports are down. Tell the stack about it */
+	printk(KERN_INFO "Both ports are down\n");
+
+	adapter->port0_link_sts = BE_PORT_LINK_DOWN;
+	adapter->port1_link_sts = BE_PORT_LINK_DOWN;
+
+	/* if this netdevice's carrier is not down, then indicate to stack */
+	if (netif_carrier_ok(netdev)) {
+		netif_carrier_off(netdev);
+		netif_stop_queue(netdev);
+	}
+	return;
+}
+
+/* Function to initialize MCC rings */
+int be_mcc_init(PBE_ADAPTER adapter)
+{
+	u32 n, r, m;
+	PBNI_NET_OBJECT pnob;
+
+	pnob = adapter->net_obj;
+	if (!pm_resume) {
+		be_init_procfs(adapter);
+		/*
+		 * Create the MCC ring so that all further communication with
+		 * MCC can go thru the ring. we do this at the end since
+		 * we do not want to be dealing with interrupts until the
+		 * initialization is complete.
+		 */
+		pnob->mcc_q_len = MCC_Q_LEN;
+		n = pnob->mcc_q_len * sizeof(MCC_WRB);
+		n = MAX(n, PAGE_SIZE);
+		/* Get number of pages */
+		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
+		pnob->mcc_q =
+		    (PMCC_WRB) __get_free_pages(GFP_KERNEL, sa_log2(m));
+		if (pnob->mcc_q == NULL)
+			goto cleanup;
+		pnob->mcc_q_pages = m;
+		pnob->mcc_q_pa = virt_to_phys(pnob->mcc_q);
+		pnob->mcc_q_pa = cpu_to_le64(pnob->mcc_q_pa);
+		/*
+		 * space for MCC WRB context
+		 */
+		pnob->mcc_wrb_ctxtLen = MCC_Q_LEN;
+		n = pnob->mcc_wrb_ctxtLen * sizeof(BE_MCC_WRB_CONTEXT);
+		n = MAX(n, PAGE_SIZE);	/* Need to allocate alteast one page */
+		/* Get number of pages */
+		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
+		pnob->mcc_wrb_ctxt =
+		    (PVOID) __get_free_pages(GFP_KERNEL, sa_log2(m));
+		if (pnob->mcc_wrb_ctxt == NULL)
+			goto cleanup;
+		pnob->mcc_wrb_ctxt_pages = m;
+		/*
+		 * Space for MCC compl. ring
+		 */
+		pnob->mcc_cq_len = MCC_CQ_LEN;
+		n = pnob->mcc_cq_len * sizeof(MCC_CQ_ENTRY);
+		n = MAX(n, PAGE_SIZE);	/* Need to allocate alteast one page */
+		/* Get number of pages */
+		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
+		pnob->mcc_cq =
+		    (PMCC_CQ_ENTRY) __get_free_pages(GFP_KERNEL,
+						     sa_log2(m));
+		if (pnob->mcc_cq == NULL)
+			goto cleanup;
+		pnob->mcc_cq_pa = virt_to_phys(pnob->mcc_cq);
+		pnob->mcc_cq_pa = cpu_to_le64(pnob->mcc_cq_pa);
+		pnob->mcc_cq_pages = m;
+
+	}
+	memset(pnob->mcc_q, 0, pnob->mcc_q_pages * PAGE_SIZE);
+	pnob->mcc_q_hd = 0;
+
+	memset(pnob->mcc_wrb_ctxt, 0,
+	       pnob->mcc_wrb_ctxt_pages * PAGE_SIZE);
+
+	memset(pnob->mcc_cq, 0, pnob->mcc_cq_pages * PAGE_SIZE);
+	pnob->mcc_cq_tl = 0;
+
+	r = bni_create_mcc_rings(adapter->net_obj);
+	if (r != BE_SUCCESS)
+		goto cleanup;
+
+	return 0;
+cleanup:
+	TRACE(DL_INIT, "Failed to create MCC rings\n");
+	return -ENOMEM;
+
+}
+
+static void be_remove(struct pci_dev *pdev)
+{
+	PBNI_NET_OBJECT pnob = NULL;
+	PBE_ADAPTER adapter = NULL;
+	int adapt_num = 0;
+	int i;
+
+	while (adapt_num < MAX_BE_DEVICES) {
+		if ((be_adapter[adapt_num]) &&
+		    (be_adapter[adapt_num]->pdev == pdev)) {
+			adapter = be_adapter[adapt_num];
+			pnob = (BNI_NET_OBJECT *) adapter->net_obj;
+			break;
+		}
+		adapt_num++;
+	}
+
+	SA_ASSERT(adapter);
+
+	flush_scheduled_work();
+
+	/* Unregister async call back function for link status updates */
+	if (be_mcc_add_async_event_callback(&pnob->mcc_q_obj,
+					    NULL, NULL) != BE_SUCCESS)
+		printk(KERN_WARNING "Unregister async callback for link "
+		       "status updates failed.\n");
+
+	cleanup_netobject(adapter->net_obj);
+
+	be_cleanup_procfs(adapter);
+
+	bni_cleanup(&adapter->chip_object);
+
+	for (i = 0; i < adapter->num_bars; i++) {
+		if (adapter->pci_bars[i].base_va) {
+			iounmap(adapter->pci_bars[i].base_va);
+		}
+	}
+
+	pci_release_regions(adapter->pdev);
+	pci_disable_device(adapter->pdev);
+
+	/* Free Link status structure */
+	if (adapter->be_link_sts) {
+		kfree(adapter->be_link_sts);
+	}
+
+	if (adapter->eth_statsp) {
+		kfree(adapter->eth_statsp);
+	}
+
+	del_timer_sync(&adapter->ctxt->get_stats_timer);
+
+	if (adapter->ctxt) {
+		kfree(adapter->ctxt);
+	}
+
+	be_adapter[adapt_num] = NULL;
+	kfree(adapter);
+}
+
+static int be_suspend(struct pci_dev *pdev, pm_message_t state)
+{
+#ifdef CONFIG_PM
+	struct net_device *netdev = NULL;
+	PBNI_NET_OBJECT pnob = NULL;
+	PBE_ADAPTER adapter = NULL;
+
+	int adapt_num = 0;
+	while (adapt_num < MAX_BE_DEVICES) {
+		if (be_adapter[adapt_num] &&
+		    (be_adapter[adapt_num]->pdev == pdev)) {
+			adapter = be_adapter[adapt_num];
+			pnob = (BNI_NET_OBJECT *) adapter->netdevp->priv;
+			netdev = adapter->netdevp;
+			netif_device_detach(netdev);
+			break;
+		}
+		adapt_num++;
+	}
+	SA_ASSERT(adapter);
+
+	netif_device_detach(netdev);
+	if (netif_running(netdev))
+		be_pm_cleanup(adapter, pnob, netdev);
+
+	pci_enable_wake(pdev, 3, 1);
+	pci_enable_wake(pdev, 4, 1);	/* D3 Cold = 4 */
+	pci_save_state(pdev);
+	pci_disable_device(pdev);
+	pci_set_power_state(pdev, pci_choose_state(pdev, state));
+#endif
+	return 0;
+}
+
+static int be_resume(struct pci_dev *pdev)
+{
+#ifdef CONFIG_PM
+	int status = 0;
+	struct net_device *netdev = NULL;
+	PBNI_NET_OBJECT pnob = NULL;
+	PBE_ADAPTER adapter = NULL;
+	u32 adapt_num = 0;
+
+	pm_resume = 1;
+	while (adapt_num < MAX_BE_DEVICES) {
+		if (be_adapter[adapt_num] &&
+			    (be_adapter[adapt_num]->pdev == pdev)) {
+			adapter = be_adapter[adapt_num];
+			pnob = (BNI_NET_OBJECT *) adapter->netdevp->priv;
+			netdev = adapter->netdevp;
+			netif_device_detach(netdev);
+			break;
+		}
+		adapt_num++;
+	}
+	SA_ASSERT(adapter);
+
+	status = pci_enable_device(pdev);
+	if (status)
+		return status;
+
+	pci_set_power_state(pdev, 0);
+	pci_restore_state(pdev);
+	pci_enable_wake(pdev, 3, 0);
+	pci_enable_wake(pdev, 4, 0);	/* 4 is D3 cold */
+
+	netif_carrier_on(netdev);
+	netif_start_queue(netdev);
+
+	if (netif_running(netdev)) {
+		status = be_prepare_interface(adapter);
+
+		if (status < 0) {
+			return (status);
+		}
+		status = be_mcc_init(adapter);
+		if (status < 0) {
+			printk(KERN_ERR "be_mcc_init failed\n");
+			return (status);
+		}
+		be_update_link_status(adapter);
+		/*
+		 * Register async call back function to handle link
+		 * status updates
+		 */
+		if (be_mcc_add_async_event_callback(
+			&adapter->net_obj->mcc_q_obj,
+			be_link_status_async_callback,
+					    (PVOID) adapter) != BE_SUCCESS) {
+			printk(KERN_WARNING "add_async_event_callback failed");
+			printk(KERN_WARNING
+			       "Link status changes may not be reflected\n");
+		}
+		bni_enable_intr(pnob);
+		enable_eq_intr(pnob);
+		be_up(adapter);
+	}
+	netif_device_attach(netdev);
+	pm_resume = 0;
+#endif
+	return 0;
+
+}
+
+#ifdef CONFIG_PM
+static void be_pm_cleanup(PBE_ADAPTER adapter,
+			  PBNI_NET_OBJECT pnob, struct net_device *netdev)
+{
+	u32 i;
+
+	netif_carrier_off(netdev);
+	netif_stop_queue(netdev);
+
+	wait_nic_tx_cmpl(pnob);
+	disable_eq_intr(pnob);
+	if (adapter->tasklet_started) {
+		tasklet_kill(&(adapter->sts_handler));
+		adapter->isr_registered = 0;
+	}
+	if (adapter->isr_registered) {
+		free_irq(netdev->irq, netdev);
+		adapter->tasklet_started = 0;
+	}
+	/* Disable chip interrupt */
+	bni_disable_intr(pnob);
+	bni_destroy_netobj(pnob, &adapter->sa_device);
+
+	if (pnob->rx_ctxt) {
+		BE_RX_PAGE_INFO *rx_page_info;
+
+		/*
+		 * go through RX context array and free
+		 * data buffs
+		 */
+		for (i = 0; i < pnob->rx_q_len; i++) {
+			rx_page_info = &(OSM_NOB(pnob)->rx_page_info[i]);
+			if ((OSM_NOB(pnob)->rx_pg_shared == FALSE) ||
+						(rx_page_info->page_offset))
+				pci_unmap_page(adapter->pdev,
+					       pci_unmap_addr(rx_page_info,
+							      bus),
+					       pnob->rx_buf_size,
+					       PCI_DMA_FROMDEVICE);
+			if (rx_page_info->page)
+				put_page(rx_page_info->page);
+			memset(rx_page_info, 0, sizeof(BE_RX_PAGE_INFO));
+		}
+		OSM_NOB(pnob)->rx_pg_info_hd = 0;
+	}
+
+}
+
+static void be_up(PBE_ADAPTER adapter)
+{
+	PBNI_NET_OBJECT pnob = adapter->net_obj;
+
+	if (OSM_NOB(pnob)->num_vlans != 0)
+		bni_config_vlan(pnob, OSM_NOB(pnob)->vlan_tag,
+				OSM_NOB(pnob)->num_vlans, NULL, NULL, 0);
+
+}
+#endif
+
+static int be_setup_tx_res(PBNI_NET_OBJECT NetObject)
+{
+	int n;
+
+	n = NetObject->tx_q_len * sizeof(PVOID *);
+	if (!pm_resume) {
+		NetObject->tx_ctxt = (PVOID *) kmalloc(n, GFP_KERNEL);
+
+		if (NetObject->tx_ctxt == NULL) {
+			TRACE(DL_INIT,
+			      "Failed to alloc memory for tx_ctxt\n");
+			return -1;
+		}
+	}
+	memset(NetObject->tx_ctxt, 0, n);
+	return 0;
+}
+
+static int be_setup_rx_res(PBNI_NET_OBJECT NetObject)
+{
+	int n;
+
+	if (!pm_resume) {
+		n = (NetObject->rx_q_len * sizeof(PVOID));
+		NetObject->rx_ctxt = kmalloc(n, GFP_KERNEL);
+		if (NetObject->rx_ctxt == NULL) {
+			TRACE(DL_INIT, "Failed to alloc memory for rx_ctxt\n");
+			return -1;
+		}
+
+		n = (NetObject->rx_q_len * sizeof(BE_RX_PAGE_INFO));
+		OSM_NOB(NetObject)->rx_page_info = kmalloc(n, GFP_KERNEL);
+		if (OSM_NOB(NetObject)->rx_page_info == NULL) {
+			TRACE(DL_INIT,
+			      "Failed to alloc memory for receive page info\n");
+			kfree(NetObject->rx_ctxt);
+			return -1;
+		}
+	}
+
+	memset(NetObject->rx_ctxt, 0, NetObject->rx_q_len * sizeof(PVOID));
+	memset(OSM_NOB(NetObject)->rx_page_info, 0,
+	       NetObject->rx_q_len * sizeof(BE_RX_PAGE_INFO));
+	OSM_NOB(NetObject)->rx_pg_info_hd = 0;
+	NetObject->rx_q_hd = 0;
+	NetObject->rx_q_posted = 0;
+	/* post  ETH RX buffers */
+	post_eth_rx_buffs(NetObject);
+
+	return 0;
+}
+
+/*
+ * free all resources associated with a NetObject
+ * Called at the time of module cleanup as well a any error during
+ * module init.  Some resources may be partially allocated in a NetObj.
+ */
+void cleanup_netobject(PBNI_NET_OBJECT pnob)
+{
+	struct net_device *netdev;
+	PBE_ADAPTER adapter;
+	struct sk_buff *skb;
+	int i;
+
+	SA_ASSERT(pnob);
+	netdev = (struct net_device *)OSM_NOB(pnob)->os_handle;
+	SA_ASSERT(netdev);
+	adapter = (PBE_ADAPTER) OSM_NOB(pnob)->adapter;
+	SA_ASSERT(adapter);
+
+	/* Only if this netdev is up */
+	if (netif_running(netdev)) {
+		/*
+		 * Let us stop the dev queue for the
+		 * interface associated with this netobj.
+		 */
+		netif_stop_queue(netdev);
+
+		/* Wait until no more pending transmits  */
+		wait_nic_tx_cmpl(pnob);
+
+		/* Disable this EQ's interrupt  */
+		disable_eq_intr(pnob);
+	}
+
+	if ((adapter->isr_registered) & (adapter->msix_enabled))
+		free_irq(adapter->msix_entries[0].vector, netdev);
+	else if ((adapter->isr_registered) & !(adapter->msix_enabled))
+		free_irq(netdev->irq, netdev);
+
+	adapter->isr_registered = 0;
+	if (adapter->msix_enabled) {
+		pci_disable_msix(adapter->pdev);
+		adapter->msix_enabled = 0;
+	}
+	if (adapter->tasklet_started) {
+		tasklet_kill(&(adapter->sts_handler));
+		adapter->tasklet_started = 0;
+	}
+	/* Disable chip interrupt */
+	bni_disable_intr(pnob);
+
+	unregister_netdev(netdev);
+	/* memory associted with netdev is freed by OS  */
+
+	/* Destroy Net Object */
+	bni_destroy_netobj(pnob, &adapter->sa_device);
+
+	adapter->net_obj = NULL;
+	adapter->netdevp = NULL;
+
+	/* free all the memory allocated for the queues */
+
+	if (pnob->mcc_q) {
+		free_pages((unsigned long)pnob->mcc_q,
+			   sa_log2(pnob->mcc_q_pages));
+	}
+
+	if (pnob->mcc_wrb_ctxt) {
+		free_pages((unsigned long)pnob->mcc_wrb_ctxt,
+			   sa_log2(pnob->mcc_wrb_ctxt_pages));
+	}
+
+	if (pnob->mcc_cq) {
+		free_pages((unsigned long)pnob->mcc_cq,
+			   sa_log2(pnob->mcc_cq_pages));
+	}
+
+	if (pnob->event_q) {
+		free_pages((unsigned long)pnob->event_q,
+			   sa_log2(pnob->event_q_pages));
+	}
+
+	if (pnob->tx_cq) {
+		free_pages((unsigned long)pnob->tx_cq,
+			   sa_log2(pnob->tx_cq_pages));
+	}
+
+	if (pnob->tx_q) {
+		free_pages((unsigned long)pnob->tx_q,
+			   sa_log2(pnob->tx_q_pages));
+	}
+
+	if (pnob->bcrx_cq) {
+		free_pages((unsigned long)pnob->bcrx_cq,
+			   sa_log2(pnob->bcrx_cq_pages));
+	}
+
+	if (pnob->rx_q) {
+		free_pages((unsigned long)pnob->rx_q,
+			   sa_log2(pnob->rx_q_pages));
+	}
+
+	if (pnob->ucrx_cq) {
+		free_pages((unsigned long)pnob->ucrx_cq,
+			   sa_log2(pnob->ucrx_cq_pages));
+	}
+
+	/* free all allocated memory stored in the net object */
+	if (pnob->rx_ctxt) {
+		BE_RX_PAGE_INFO *rx_page_info;
+		/*
+		 * go through RX context array and free data buffs
+		 */
+		for (i = 0; i < pnob->rx_q_len; i++) {
+			rx_page_info = &(OSM_NOB(pnob)->rx_page_info[i]);
+			if ((OSM_NOB(pnob)->rx_pg_shared == FALSE) ||
+						(rx_page_info->page_offset)) {
+				pci_unmap_page(adapter->pdev,
+					pci_unmap_addr(rx_page_info, bus),
+					pnob->rx_buf_size, PCI_DMA_FROMDEVICE);
+			}
+			if (rx_page_info->page) {
+				put_page(rx_page_info->page);
+			}
+			memset(rx_page_info, 0, sizeof(BE_RX_PAGE_INFO));
+		}
+		OSM_NOB(pnob)->rx_pg_info_hd = 0;
+		kfree(OSM_NOB(pnob)->rx_page_info);
+		kfree(pnob->rx_ctxt);
+	}
+
+	if (pnob->tx_ctxt) {
+		for (i = 0; i < pnob->tx_q_len; i++) {
+			skb = (struct sk_buff *)pnob->tx_ctxt[i];
+			if (skb) {
+				kfree_skb(skb);
+			}
+		}
+		kfree(pnob->tx_ctxt);
+	}
+
+	if (pnob->mb_ptr) {
+		kfree(pnob->mb_ptr);
+	}
+
+	if (OSM_NOB(pnob)) {
+		kfree(OSM_NOB(pnob));
+	}
+
+	/* finally,  free the net object itself */
+	kfree(pnob);
+
+}
+
+/*
+ * this function creates a NetObject with a set of Eth rings.
+ */
+int be_prepare_interface(PBE_ADAPTER adapter)
+{
+	struct net_device *netdev = NULL;
+	PBNI_NET_OBJECT pnob = NULL;
+	SA_DEV_BAR_LOCATIONS pci_bars[3];
+	int status;
+	u32 n, m;
+	PVOID p;
+
+	if (!pm_resume) {
+		/*Normal Mode */
+		memcpy(pci_bars, adapter->pci_bars,
+		       sizeof(adapter->pci_bars));
+
+		pnob = (PBNI_NET_OBJECT)
+		    kmalloc(sizeof(BNI_NET_OBJECT), GFP_KERNEL);
+
+		if (pnob == NULL) {
+			TRACE(DL_INIT,
+			      "Failed to alloc memory for NetObject\n");
+			goto err_ret1;
+		}
+		memset(pnob, 0, sizeof(BNI_NET_OBJECT));
+		TRACE(DL_INIT, "Done with net obj alloc\n");
+
+		pnob->osm_netobj = (linux_net_object_t *)
+		    kmalloc(sizeof(linux_net_object_t), GFP_KERNEL);
+		if (pnob->osm_netobj == NULL) {
+			TRACE(DL_INIT,
+			      "Failed to alloc memory OSM NetObject\n");
+			kfree(pnob);
+			goto err_ret1;
+		}
+		memset(pnob->osm_netobj, 0, sizeof(linux_net_object_t));
+
+		OSM_NOB(pnob)->devno = 0;
+		OSM_NOB(pnob)->adapter = adapter;
+
+		/* Mail box sgl */
+		pnob->mb_sgl.length = sizeof(MCC_MAILBOX);
+		p = kmalloc(pnob->mb_sgl.length + 16, GFP_KERNEL);
+		if (p == NULL) {
+			TRACE(DL_INIT,
+			      "Failed to alloc mem for MCC_MAILBOX\n");
+			goto err_ret1;
+		}
+		/* Mailbox pointer needs to be 16 byte aligned */
+		pnob->mb_ptr = p;
+		p = (PVOID) ((unsigned long)(p + 15) & ~0xf);
+		pnob->mb_sgl.va = (void *)p;
+		pnob->mb_sgl.pa = virt_to_phys(p);
+		pnob->mb_sgl.pa = cpu_to_le64(pnob->mb_sgl.pa);
+		/*
+		 * Event queue
+		 */
+		pnob->event_q_len = EVENT_Q_LEN;
+		n = pnob->event_q_len * sizeof(EQ_ENTRY);
+		n = MAX(n, (2 * PAGE_SIZE));
+		/* Get number of pages */
+		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
+		pnob->event_q = (PEQ_ENTRY)
+		    __get_free_pages(GFP_KERNEL, sa_log2(m));
+		if (pnob->event_q == NULL)
+			goto err_ret1;
+		pnob->event_q_pa = virt_to_phys(pnob->event_q);
+		pnob->event_q_pa = cpu_to_le64(pnob->event_q_pa);
+		pnob->event_q_pages = m;
+		/*
+		 * Eth TX queue
+		 */
+		pnob->tx_q_len = ETH_TXQ_LEN;
+		pnob->tx_q_port = 0;	/* No port binding */
+		n = pnob->tx_q_len * sizeof(ETH_WRB);
+		n = MAX(n, PAGE_SIZE);	/* Need to allocate alteast one page */
+		/* Get number of pages */
+		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
+		pnob->tx_q = (PETH_WRB)
+		    __get_free_pages(GFP_KERNEL, sa_log2(m));
+		if (pnob->tx_q == NULL)
+			goto err_ret1;
+		pnob->tx_q_pa = virt_to_phys(pnob->tx_q);
+		pnob->tx_q_pa = cpu_to_le64(pnob->tx_q_pa);
+		pnob->tx_q_pages = m;
+		/*
+		 * Eth TX Compl queue
+		 */
+		pnob->txcq_len = ETH_TXCQ_LEN;
+		n = pnob->txcq_len * sizeof(ETH_TX_COMPL);
+		n = MAX(n, PAGE_SIZE);	/* Need to allocate alteast one page */
+		/* Get number of pages */
+		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
+		pnob->tx_cq = (PETH_TX_COMPL)
+		    __get_free_pages(GFP_KERNEL, sa_log2(m));
+		if (pnob->tx_cq == NULL)
+			goto err_ret1;
+		pnob->tx_cq_pa = virt_to_phys(pnob->tx_cq);
+		pnob->tx_cq_pa = cpu_to_le64(pnob->tx_cq_pa);
+		pnob->tx_cq_pages = m;
+		/*
+		 * Eth RX queue
+		 */
+		pnob->rx_q_len = ETH_RXQ_LEN;
+		n = pnob->rx_q_len * sizeof(ETH_RX_D);
+		n = MAX(n, PAGE_SIZE);	/* Need to allocate alteast one page */
+		/* Get number of pages */
+		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
+		pnob->rx_q = (PETH_RX_D)
+		    __get_free_pages(GFP_KERNEL, sa_log2(m));
+		if (pnob->rx_q == NULL)
+			goto err_ret1;
+		pnob->rx_q_pa = virt_to_phys(pnob->rx_q);
+		pnob->rx_q_pa = cpu_to_le64(pnob->rx_q_pa);
+		pnob->rx_q_pages = m;
+		/*
+		 * Eth Unicast RX Compl queue
+		 */
+		pnob->ucrx_cq_len = ETH_UC_RXCQ_LEN;
+		n = pnob->ucrx_cq_len * sizeof(ETH_RX_COMPL);
+		n = MAX(n, PAGE_SIZE);	/* Need to allocate alteast one page */
+		/* Get number of pages */
+		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
+		pnob->ucrx_cq = (PETH_RX_COMPL)
+		    __get_free_pages(GFP_KERNEL, sa_log2(m));
+		if (pnob->ucrx_cq == NULL)
+			goto err_ret1;
+		pnob->ucrx_cq_pa = virt_to_phys(pnob->ucrx_cq);
+		pnob->ucrx_cq_pa = cpu_to_le64(pnob->ucrx_cq_pa);
+		pnob->ucrx_cq_pages = m;
+		/*
+		 * Eth Broadcast RX Compl queue
+		 */
+		pnob->bcrx_cq_len = ETH_BC_RXCQ_LEN;
+		n = pnob->bcrx_cq_len * sizeof(ETH_RX_COMPL);
+		n = MAX(n, PAGE_SIZE);
+		/* Get number of pages */
+		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
+		pnob->bcrx_cq = (PETH_RX_COMPL)
+		    __get_free_pages(GFP_KERNEL, sa_log2(m));
+		if (pnob->bcrx_cq == NULL)
+			goto err_ret1;
+		pnob->bcrx_cq_pa = virt_to_phys(pnob->bcrx_cq);
+		pnob->bcrx_cq_pa = cpu_to_le64(pnob->bcrx_cq_pa);
+		pnob->bcrx_cq_pages = m;
+
+		/* Allocate DMA'ble Memory for IOCTL_ETH_GET_STATISTICS */
+		adapter->eth_statsp = (IOCTL_ETH_GET_STATISTICS *)
+		    kmalloc(sizeof(IOCTL_ETH_GET_STATISTICS), GFP_KERNEL);
+		if (adapter->eth_statsp == NULL) {
+			TRACE(DL_INIT,
+			      "Failed to alloc memory for Eth stats\n");
+			goto err_ret1;
+		}
+		pnob->rx_buf_size = rxbuf_size;
+		/*
+		 * Set dev close to be TRUE. This will be enabled on dev open
+		 */
+		adapter->dev_state = BE_DEV_STATE_NONE;
+	} else {
+		pnob = adapter->net_obj;
+		memcpy(pci_bars, adapter->pci_bars,
+		       sizeof(adapter->pci_bars));
+	}
+
+	memset(pnob->event_q, 0, pnob->event_q_pages * PAGE_SIZE);
+	pnob->event_q_tl = 0;
+
+	memset(pnob->tx_q, 0, pnob->tx_q_pages * PAGE_SIZE);
+	pnob->tx_q_hd = 0;
+	pnob->tx_q_tl = 0;
+
+	memset(pnob->tx_cq, 0, pnob->tx_cq_pages * PAGE_SIZE);
+	pnob->tx_cq_tl = 0;
+
+	memset(pnob->rx_q, 0, pnob->rx_q_pages * PAGE_SIZE);
+
+	memset(pnob->ucrx_cq, 0, pnob->ucrx_cq_pages * PAGE_SIZE);
+	pnob->ucrx_cq_tl = 0;
+
+	memset(pnob->bcrx_cq, 0, pnob->bcrx_cq_pages * PAGE_SIZE);
+	pnob->bcrx_cq_tl = 0;
+	n = bni_create_netobj(pnob, pci_bars, adapter->num_bars,
+				   &adapter->sa_device,
+				   &adapter->chip_object);
+	if (n != BE_SUCCESS) {
+		TRACE(DL_ERROR, "bni_create_netobj failed - returned %x", n);
+		goto err_ret1;
+	}
+	TRACE(DL_INIT, "Creation of NetObject Done");
+
+	status = init_be_netdev(adapter, pnob);
+	if (status < 0)
+		goto err_ret;
+	netdev = OSM_NOB(pnob)->os_handle;
+
+#ifdef CONFIG_BENET_NAPI
+	netif_napi_add(netdev, &OSM_NOB(pnob)->napi, be_poll, 64);
+	OSM_NOB(pnob)->rx_sched = FALSE;
+	spin_lock_init(&OSM_NOB(pnob)->rx_lock);
+#endif
+
+	if (be_setup_tx_res(pnob))
+		goto err_ret;
+	if (be_setup_rx_res(pnob))
+		goto err_ret;
+
+	if (!pm_resume) {
+		adapter->netdevp = OSM_NOB(pnob)->os_handle;
+		adapter->net_obj = pnob;
+	}
+	return 0;
+
+err_ret:
+	cleanup_netobject(pnob);
+
+err_ret1:
+	printk(KERN_ERR "Interface initialization failed\n");
+	return -1;
+}
+
+void enable_eq_intr(PBNI_NET_OBJECT pnob)
+{
+	bni_enable_eq_intr(pnob);
+}
+
+void disable_eq_intr(PBNI_NET_OBJECT pnob)
+{
+	bni_disable_eq_intr(pnob);
+}
+
+/* Wait until no more pending transmits  */
+void wait_nic_tx_cmpl(PBNI_NET_OBJECT pnob)
+{
+	int i;
+
+	/* Wait for 20us * 50000 (= 1s) and no more */
+	i = 0;
+	while ((pnob->tx_q_tl != pnob->tx_q_hd) && (i < 50000)) {
+		++i;
+		udelay(20);
+	}
+
+	/* Check for no more pending transmits */
+	if (i >= 50000) {
+		printk(KERN_WARNING
+		       "Did not receive completions for all TX requests\n");
+	}
+}
diff -uprN orig/linux-2.6.24.2/drivers/net/benet/be_netif.c benet/linux-2.6.24.2/drivers/net/benet/be_netif.c
--- orig/linux-2.6.24.2/drivers/net/benet/be_netif.c	1970-01-01 05:30:00.000000000 +0530
+++ benet/linux-2.6.24.2/drivers/net/benet/be_netif.c	2008-02-14 15:31:33.420341008 +0530
@@ -0,0 +1,597 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or at your option any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor
+ * Boston, MA 02110-1301 USA
+ *
+ *
+ * The full GNU General Public License is included in this distribution
+ * in the file called GPL.
+ *
+ * Contact Information:
+ * linux-drivers@serverengines.com
+ *
+ * ServerEngines
+ * 209 N. Fair Oaks Ave
+ * Sunnyvale, CA 94085
+ *
+ */
+/*
+ * be_netif.c
+ *
+ * This file contains various entry points of drivers seen by tcp/ip stack.
+ */
+
+#include <linux/pci.h>
+#include "be.h"
+#include <linux/ip.h>
+
+extern unsigned int ls_mss;
+
+unsigned int pm_resume;
+
+/* Strings to print Link properties */
+char *link_speed[] = {
+	"Invalid link Speed Value",
+	"10 Mbps",
+	"100 Mbps",
+	"1 Gbps",
+	"10 Gbps"
+};
+
+char *link_duplex[] = {
+	"Invalid Duplex Value",
+	"Half Duplex",
+	"Full Duplex"
+};
+
+#ifdef BE_POLL_MODE
+struct net_device *irq_netdev;
+#endif
+
+int benet_xmit(struct sk_buff *skb, struct net_device *netdev);
+int benet_set_mac_addr(struct net_device *netdev, void *p);
+
+void be_print_link_info(PBE_LINK_STATUS lnk_status)
+{
+	printk("PortNo 0:");
+	if (lnk_status->mac0_speed && lnk_status->mac0_duplex) {
+		/* Port is up and running */
+		if (lnk_status->mac0_speed < 5)
+			printk(" Link Speed: %s,",
+			       link_speed[lnk_status->mac0_speed]);
+		else
+			printk(" %s,", link_speed[0]);
+
+		if (lnk_status->mac0_duplex < 3)
+			printk(" %s",
+			       link_duplex[lnk_status->mac0_duplex]);
+		else
+			printk(" %s", link_duplex[0]);
+
+		if (lnk_status->active_port == 0)
+			printk("(active)\n");
+		else
+			printk("\n");
+	} else
+		printk(" Down \n");
+
+	printk("PortNo 1:");
+	if (lnk_status->mac1_speed && lnk_status->mac1_duplex) {
+		/* Port is up and running */
+		if (lnk_status->mac1_speed < 5)
+			printk(" Link Speed: %s,",
+			       link_speed[lnk_status->mac1_speed]);
+		else
+			printk(" %s,", link_speed[0]);
+
+		if (lnk_status->mac1_duplex < 3)
+			printk(" %s",
+			       link_duplex[lnk_status->mac1_duplex]);
+		else
+			printk(" %s", link_duplex[0]);
+
+		if (lnk_status->active_port == 1)
+			printk("(active)\n");
+		else
+			printk("\n");
+	} else
+		printk(" Down \n");
+
+	return;
+}
+
+int benet_open(struct net_device *netdev)
+{
+	PBNI_NET_OBJECT pnob = (BNI_NET_OBJECT *) netdev->priv;
+	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
+
+	TRACE(DL_INIT, "entered-benet_open()");
+
+	if (adapter->dev_state < BE_DEV_STATE_INIT)
+		return -EAGAIN;
+
+	be_update_link_status(adapter);
+
+	/*
+	 * Set carrier on only if Physical Link up
+	 * Either of the port link status up signifies this
+	 */
+	if ((adapter->port0_link_sts == BE_PORT_LINK_UP) ||
+	    (adapter->port1_link_sts == BE_PORT_LINK_UP)) {
+		netif_start_queue(netdev);
+		netif_carrier_on(netdev);
+	}
+
+	enable_eq_intr(pnob);
+	adapter->dev_state = BE_DEV_STATE_OPEN;
+
+#ifdef CONFIG_BENET_NAPI
+	napi_enable(&OSM_NOB(pnob)->napi);
+#endif
+	return 0;
+}
+
+int benet_close(struct net_device *netdev)
+{
+	PBNI_NET_OBJECT pnob = (BNI_NET_OBJECT *) netdev->priv;
+	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
+
+	/* Stop Transmitting */
+	netif_stop_queue(netdev);
+
+	synchronize_irq(netdev->irq);
+
+	/* Wait until no more pending transmits  */
+	wait_nic_tx_cmpl(pnob);
+
+	adapter->dev_state = BE_DEV_STATE_INIT;
+
+	netif_carrier_off(netdev);
+
+	adapter->port0_link_sts = BE_PORT_LINK_DOWN;
+	adapter->port1_link_sts = BE_PORT_LINK_DOWN;
+
+#ifdef CONFIG_BENET_NAPI
+	napi_disable(&OSM_NOB(pnob)->napi);
+#endif
+	return 0;
+}
+
+int benet_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+{
+	TRACE(DL_INIT, "entered benet_ioctl()");
+
+	switch (cmd) {
+	case SIOCETHTOOL:
+		return be_ethtool_ioctl(dev, ifr);
+	default:
+		return -EOPNOTSUPP;
+	}
+}
+
+/*
+ * Setting a Mac Address for BE
+ * Takes netdev and a void pointer as arguments.
+ * The pointer holds the new addres to be used.
+ */
+int benet_set_mac_addr(struct net_device *netdev, void *p)
+{
+	struct sockaddr *addr = p;
+	PBNI_NET_OBJECT pnob;
+	SA_MAC_ADDRESS mac_addr;
+
+	SA_ASSERT(netdev);
+	pnob = (PBNI_NET_OBJECT) netdev->priv;
+	SA_ASSERT(pnob);
+
+	memcpy(pnob->mac_address, addr->sa_data, netdev->addr_len);
+	memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
+	memcpy(mac_addr.bytes, pnob->mac_address, SA_MAC_ADDRESS_SIZE);
+	bni_set_uc_mac_adr(pnob, 0, 0, OSM_NOB(pnob)->devno,
+			   &mac_addr, NULL, NULL);
+	/*
+	 * Since we are doing Active-Passive failover, both
+	 * ports should have matching MAC addresses everytime.
+	 */
+	bni_set_uc_mac_adr(pnob, 1, 0, OSM_NOB(pnob)->devno,
+			   &mac_addr, NULL, NULL);
+
+	return 0;
+}
+
+void get_stats_timer_handler(unsigned long context)
+{
+	be_timer_ctxt_t *ctxt = (be_timer_ctxt_t *) context;
+	if (atomic_read(&ctxt->get_stat_flag)) {
+		atomic_dec(&ctxt->get_stat_flag);
+		up((PVOID) ctxt->get_stat_sem);
+	}
+	del_timer(&ctxt->get_stats_timer);
+	return;
+}
+
+void get_stat_cb(PVOID context, BESTATUS status, MCC_WRB *optional_wrb)
+{
+	be_timer_ctxt_t *ctxt = (be_timer_ctxt_t *) context;
+	/*
+	 * just up the semaphore if the get_stat_flag
+	 * reads 1. so that the waiter can continue.
+	 * If it is 0, then it was handled by the timer handler.
+	 */
+	if (atomic_read(&ctxt->get_stat_flag)) {
+		atomic_dec(&ctxt->get_stat_flag);
+		up((PVOID) ctxt->get_stat_sem);
+	}
+}
+
+struct net_device_stats *benet_get_stats(struct net_device *dev)
+{
+	PBNI_NET_OBJECT pnob = dev->priv;
+	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
+	u64 pa;
+	be_timer_ctxt_t *ctxt = adapter->ctxt;
+
+	if (!BE_DEV_STATE_OPEN(adapter) || (pm_resume)) {
+		/* Return previously read stats */
+		return &(adapter->benet_stats);
+	}
+	/* Get Physical Addr */
+	pa = pci_map_single(adapter->pdev, adapter->eth_statsp,
+			    sizeof(IOCTL_ETH_GET_STATISTICS),
+			    PCI_DMA_FROMDEVICE);
+	pa = cpu_to_le64(pa);
+	ctxt->get_stat_sem = (unsigned long)&adapter->get_eth_stat_sem;
+	bni_get_stats(adapter->net_obj, adapter->eth_statsp,
+		      pa, get_stat_cb, (PVOID) ctxt);
+	atomic_inc(&ctxt->get_stat_flag);
+	ctxt->get_stats_timer.data = (unsigned long)ctxt;
+	mod_timer(&ctxt->get_stats_timer, (jiffies + (HZ * 2)));
+	down((PVOID) ctxt->get_stat_sem); /* block till callback is called */
+
+	/*Adding port0 and port1 stats. */
+	adapter->benet_stats.rx_packets =
+	    adapter->eth_statsp->params.response.p0recvdtotalframes +
+	    adapter->eth_statsp->params.response.p1recvdtotalframes;
+	adapter->benet_stats.tx_packets =
+	    adapter->eth_statsp->params.response.p0xmitunicastframes +
+	    adapter->eth_statsp->params.response.p1xmitunicastframes;
+	adapter->benet_stats.tx_bytes =
+	    adapter->eth_statsp->params.response.p0xmitbyteslsd +
+	    adapter->eth_statsp->params.response.p1xmitbyteslsd;
+	adapter->benet_stats.rx_errors =
+	    adapter->eth_statsp->params.response.p0crcerrors +
+	    adapter->eth_statsp->params.response.p1crcerrors;
+	adapter->benet_stats.rx_errors +=
+	    adapter->eth_statsp->params.response.p0alignmentsymerrs +
+	    adapter->eth_statsp->params.response.p1alignmentsymerrs;
+	adapter->benet_stats.rx_errors +=
+	    adapter->eth_statsp->params.response.p0inrangelenerrors +
+	    adapter->eth_statsp->params.response.p1inrangelenerrors;
+	adapter->benet_stats.rx_bytes =
+	    adapter->eth_statsp->params.response.p0recvdtotalbytesLSD +
+	    adapter->eth_statsp->params.response.p1recvdtotalbytesLSD;
+	adapter->benet_stats.rx_crc_errors =
+	    adapter->eth_statsp->params.response.p0crcerrors +
+	    adapter->eth_statsp->params.response.p1crcerrors;
+
+	adapter->benet_stats.tx_packets +=
+	    adapter->eth_statsp->params.response.p0xmitmulticastframes +
+	    adapter->eth_statsp->params.response.p1xmitmulticastframes;
+	adapter->benet_stats.tx_packets +=
+	    adapter->eth_statsp->params.response.p0xmitbroadcastframes +
+	    adapter->eth_statsp->params.response.p1xmitbroadcastframes;
+	adapter->benet_stats.tx_errors = 0;
+
+	adapter->benet_stats.multicast =
+	    adapter->eth_statsp->params.response.p0xmitmulticastframes +
+	    adapter->eth_statsp->params.response.p1xmitmulticastframes;
+
+	adapter->benet_stats.rx_fifo_errors =
+	    adapter->eth_statsp->params.response.p0rxfifooverflowdropped +
+	    adapter->eth_statsp->params.response.p1rxfifooverflowdropped;
+	adapter->benet_stats.rx_frame_errors =
+	    adapter->eth_statsp->params.response.p0alignmentsymerrs +
+	    adapter->eth_statsp->params.response.p1alignmentsymerrs;
+	adapter->benet_stats.rx_length_errors =
+	    adapter->eth_statsp->params.response.p0inrangelenerrors +
+	    adapter->eth_statsp->params.response.p1inrangelenerrors;
+	adapter->benet_stats.rx_length_errors +=
+	    adapter->eth_statsp->params.response.p0outrangeerrors +
+	    adapter->eth_statsp->params.response.p1outrangeerrors;
+	adapter->benet_stats.rx_length_errors +=
+	    adapter->eth_statsp->params.response.p0frametoolongerrors +
+	    adapter->eth_statsp->params.response.p1frametoolongerrors;
+
+	pci_unmap_single(adapter->pdev, (ulong) adapter->eth_statsp,
+			 sizeof(IOCTL_ETH_GET_STATISTICS),
+			 PCI_DMA_FROMDEVICE);
+	return &(adapter->benet_stats);
+
+}
+
+/*
+ * function called by the stack for transmitting an ether frame
+ */
+int benet_xmit(struct sk_buff *skb, struct net_device *netdev)
+{
+	PBNI_NET_OBJECT pnob = netdev->priv;
+	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
+	u8 proto;
+	struct iphdr *ip;
+	u16 lso_mss;
+#ifdef NETIF_F_TSO
+	u32 segs;
+
+	lso_mss = skb_shinfo(skb)->gso_size;
+	segs = skb_shinfo(skb)->gso_segs;
+	/*
+	 * bug# 3356.
+	 * If a LSO request translates into a single segment,
+	 * it should be posted as a ethernet WRB with no LSO.
+	 */
+	if (segs == 1)
+		lso_mss = 0;
+#else
+	lso_mss = 0;
+#endif /*TSO */
+
+	TRACE(DL_SEND, "benet_xmit: Entry... len = %d", skb->len);
+
+	if (skb->ip_summed == CHECKSUM_PARTIAL) {
+		ip = (struct iphdr *)ip_hdr(skb);
+		proto = ip->protocol;
+	} else {
+		proto = 0;
+	}
+
+	if (betx_ether_frame(adapter, pnob, skb, proto, 0, lso_mss) !=
+						BE_SUCCESS) {
+		return 1;	/* NETDEV_TX_BUSY */
+	}
+
+	netdev->trans_start = jiffies;
+	TRACE(DL_SEND, "benet_xmit() : Exit");
+	return 0;		/*NETDEV_TX_OK */
+
+}
+
+/*
+ * This is the driver entry point to change the mtu of the device
+ * Returns 0 for success and errno for failure.
+ */
+int benet_change_mtu(struct net_device *netdev, int new_mtu)
+{
+	u32 mtu, max_mtu, max_hdr;
+	max_hdr = BE_ENET_HEADER_SIZE + BE_ETHERNET_FCS_SIZE +
+	    BE_SNAP_HEADER_SIZE + BE_HEADER_802_2_SIZE;
+
+	if (netdev->priv_flags & IFF_802_1Q_VLAN)
+		max_hdr += BE_VLAN_HEADER_SIZE;
+
+	mtu = new_mtu + max_hdr;
+
+	/*
+	 * BE supports jumbo frame size upto 9000 bytes including the link layer
+	 * header. Considering the different variants of frame formats possible
+	 * like VLAN, SNAP/LLC, the maximum possible value for MTU is 8974 bytes
+	 */
+	max_mtu = BE_MAX_JUMBO_FRAME_SIZE;
+
+	if ((mtu < BE_MIN_ETHER_FRAME_SIZE) || (mtu > max_mtu)) {
+		printk(KERN_WARNING "Invalid MTU requested. "
+		       "Must be between %d and %d bytes\n",
+		       BE_MIN_SUPPORT_FRAME_SIZE, (max_mtu - max_hdr));
+		return -EINVAL;
+	}
+	printk(KERN_INFO "MTU changed from %d to %d\n", netdev->mtu,
+	       new_mtu);
+	netdev->mtu = new_mtu;
+	return 0;
+}
+
+/*
+ * This is the driver entry point to register a vlan with the device
+ */
+void benet_vlan_register(struct net_device *netdev, struct vlan_group *grp)
+{
+	PBNI_NET_OBJECT pnob = netdev->priv;
+
+	TRACE(DL_VLAN, "vlan register called");
+
+	disable_eq_intr(pnob);
+	OSM_NOB(pnob)->vlan_grp = grp;
+	OSM_NOB(pnob)->num_vlans = 0;
+	enable_eq_intr(pnob);
+}
+
+/*
+ * This is the driver entry point to add a vlan vlan_id
+ * with the device netdev
+ */
+void benet_vlan_add_vid(struct net_device *netdev, u16 vlan_id)
+{
+	PBNI_NET_OBJECT pnob = netdev->priv;
+
+	TRACE(DL_VLAN, "Add vlan ID");
+	if (OSM_NOB(pnob)->num_vlans == (BE_NUM_VLAN_SUPPORTED-1)) {
+		/* no  way to return an error */
+		printk(KERN_ERR
+			"BladeEngine: Cannot configure more than %d Vlans\n",
+				BE_NUM_VLAN_SUPPORTED);
+		return;
+	}
+	/*The new vlan tag will be in the slot indicated by num_vlans. */
+	OSM_NOB(pnob)->vlan_tag[OSM_NOB(pnob)->num_vlans++] = vlan_id;
+	bni_config_vlan(pnob, OSM_NOB(pnob)->vlan_tag,
+			OSM_NOB(pnob)->num_vlans, NULL, NULL, 0);
+}
+
+/*
+ * This is the driver entry point to remove a vlan vlan_id
+ * with the device netdev
+ */
+void benet_vlan_rem_vid(struct net_device *netdev, u16 vlan_id)
+{
+	PBNI_NET_OBJECT pnob = netdev->priv;
+
+	u32 i, value;
+
+	TRACE(DL_VLAN, "Remove vlan ID");
+	/*
+	 * In Blade Engine, we support 32 vlan tag filters across both ports.
+	 * To program a vlan tag, the RXF_RTPR_CSR register is used.
+	 * Each 32-bit value of RXF_RTDR_CSR can address 2 vlan tag entries.
+	 * The Vlan table is of depth 16. thus we support 32 tags.
+	 */
+
+	value = vlan_id | VLAN_VALID_BIT;
+	TRACE(DL_VLAN, "Value is %x", value);
+	TRACE(DL_VLAN, "Number of vlan tags is %d", OSM_NOB(pnob)->num_vlans);
+	for (i = 0; i < BE_NUM_VLAN_SUPPORTED; i++) {
+		TRACE(DL_VLAN, "Value at index %d is %x", i,
+		      OSM_NOB(pnob)->vlan_tag[i]);
+		if (OSM_NOB(pnob)->vlan_tag[i] == vlan_id) {
+			TRACE(DL_VLAN, "Vlan ID found at index %d", i);
+			break;
+		}
+	}
+
+	if (i == BE_NUM_VLAN_SUPPORTED) {
+		TRACE(DL_VLAN, "Vlan ID %d not dound - remove failed", value);
+		return;
+	}
+	/* Now compact the vlan tag array by removing hole created. */
+	while ((i + 1) < BE_NUM_VLAN_SUPPORTED) {
+		OSM_NOB(pnob)->vlan_tag[i] = OSM_NOB(pnob)->vlan_tag[i + 1];
+		i++;
+	}
+	if ((i + 1) == BE_NUM_VLAN_SUPPORTED) {
+		OSM_NOB(pnob)->vlan_tag[i] = (u16) 0x0;
+	}
+	OSM_NOB(pnob)->num_vlans--;
+	bni_config_vlan(pnob, OSM_NOB(pnob)->vlan_tag,
+			OSM_NOB(pnob)->num_vlans, NULL, NULL, 0);
+	TRACE(DL_VLAN, "Removed the vlan ID of %d", vlan_id);
+}
+
+/*
+ * This function is called to program multicast
+ * address in the multicast filter of the ASIC.
+ */
+void be_set_multicast_filter(struct net_device *netdev)
+{
+	PBNI_NET_OBJECT pnob = netdev->priv;
+	struct dev_mc_list *mc_ptr;
+	SA_MAC_ADDRESS mac_addr[32];
+	int i;
+
+	if (netdev->flags & IFF_ALLMULTI) {
+		/* set BE in Multicast promiscuous */
+		bni_set_mc_filter(pnob, 0, TRUE, NULL, NULL, NULL);
+		return;
+	}
+
+	for (mc_ptr = netdev->mc_list, i = 0; mc_ptr;
+	     mc_ptr = mc_ptr->next, i++) {
+		memcpy(mac_addr[i].bytes, mc_ptr->dmi_addr,
+		       SA_MAC_ADDRESS_SIZE);
+	}
+	/* reset the promiscuous mode also. */
+	bni_set_mc_filter(pnob, i, FALSE, mac_addr, NULL, NULL);
+
+}
+
+/*
+ * This is the driver entry point to set multicast list
+ * with the device netdev. This function will be used to
+ * set promiscuous mode or multicast promiscuous mode
+ * or multicast mode....
+ */
+void benet_set_multicast_list(struct net_device *netdev)
+{
+	PBNI_NET_OBJECT pnob = netdev->priv;
+	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
+
+	if (netdev->flags & IFF_PROMISC) {
+		bni_set_promisc(adapter->net_obj);
+
+	} else if (netdev->flags & IFF_ALLMULTI) {
+		bni_reset_promisc(adapter->net_obj);
+		be_set_multicast_filter(netdev);
+	} else {
+		bni_reset_promisc(adapter->net_obj);
+		be_set_multicast_filter(netdev);
+	}
+}
+
+#ifdef CONFIG_NET_POLL_CONTROLLER
+static void be_netpoll(struct net_device *netdev)
+{
+	disable_irq(netdev->irq);
+	be_int(netdev->irq, netdev, NULL);
+	enable_irq(netdev->irq);
+}
+#endif
+
+/*
+ * standard entry point functions for all Linux network interface drivers
+ */
+int benet_probe(struct net_device *netdev)
+{
+	PBNI_NET_OBJECT pnob = netdev->priv;
+	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
+
+	TRACE(DL_INIT, "entered-benet_probe().");
+
+	ether_setup(netdev);
+
+	netdev->open = &benet_open;
+	netdev->stop = &benet_close;
+	netdev->do_ioctl = &benet_ioctl;
+
+	netdev->hard_start_xmit = &benet_xmit;
+
+	netdev->get_stats = &benet_get_stats;
+
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	netdev->poll_controller = &be_netpoll;
+#endif
+
+	netdev->set_multicast_list = &benet_set_multicast_list;
+
+	netdev->change_mtu = &benet_change_mtu;
+	netdev->set_mac_address = &benet_set_mac_addr;
+
+	netdev->vlan_rx_register = benet_vlan_register;
+	netdev->vlan_rx_add_vid = benet_vlan_add_vid;
+	netdev->vlan_rx_kill_vid = benet_vlan_rem_vid;
+
+	netdev->features =
+	    NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_HW_VLAN_RX |
+	    NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | NETIF_F_IP_CSUM;
+
+	netdev->flags |= IFF_MULTICAST;
+
+	/* If device is DAC Capable, set the HIGHDMA flag for netdevice. */
+	if (adapter->dma_64bit_cap)
+		netdev->features |= NETIF_F_HIGHDMA;
+
+#ifdef NETIF_F_TSO
+	netdev->features |= NETIF_F_TSO;
+#endif
+
+	be_set_ethtool_ops(netdev);

why is normal macro not good enough?

+	return 0;
+}




^ permalink raw reply

* Re: [PATHCH 1/16]  ServerEngines 10Gb NIC driver
From: Jay Cliburn @ 2008-02-17 16:03 UTC (permalink / raw)
  To: Subbu Seetharaman; +Cc: netdev
In-Reply-To: <20080217023031.f9fe8e69@mailhost.serverengines.com>



On Sat, 16 Feb 2008 18:30:31 -0800
"Subbu Seetharaman" <subbus@serverengines.com> wrote:

At least one patch is corrupt and won't apply.


jcliburn@osprey:~/kernel-work/linux-2.6.git$ git-am ~/Desktop/bes/*

Applying ServerEngines 10Gb NIC driver

Wrote tree b1ecce4b33eb3dbb3d0785f3ab853f0b1102f2ad
Committed: 8a4bff06c085e2d131c4d95487d5363a8a2db438

Applying ServerEngines 10Gb NIC driver

Wrote tree 2b24436f71bda6986d752ac239ecdf3e5a73c488
Committed: 552235405edc310e25441eb1d301511b3e1bc35f

Applying ServerEngines 10Gb NIC driver

Wrote tree 9c6298ac1d1bd7356f0c2afb9404fd8937df2b79
Committed: e586bba1963d80c1b4e798117bbf4cef281864b1

Applying ServerEngines 10Gb NIC driver

Wrote tree da1742e47795eeb99a19d8f5d5b86dc3e45f40d1
Committed: 6ec3655d569cdc240557f52de80fee12c4a9a4b5

Applying ServerEngines 10Gb NIC driver

Wrote tree 2fe60b30217ae99ce06082cbc0ac1a80177b337a
Committed: a0e6eeed7f262ab757a3b3cb304c8afb4e4f4f6a

Applying ServerEngines 10Gb NIC driver

Adds trailing whitespace.
.dotest/patch:36: * Autogenerated by srcgen version: 0127  */ #ifndef 
Adds trailing whitespace.
.dotest/patch:52:   /* iSCSI Completion Queue Entry definition for cmd/cxn level 
Adds trailing whitespace.
.dotest/patch:77:   /* iSCSI Completion Queue Entry definition for cmd/cxn level 
Adds trailing whitespace.
.dotest/patch:99:SG_C_ASSERT(__sizeof__ISCSI_CQ_ENTRY, sizeof(ISCSI_CQ_ENTRY) == 16); 
Adds trailing whitespace.
.dotest/patch:305:   /* iSCSI Completion Queue Entry definition for driver msg 
fatal: corrupt patch at line 633
Patch failed at 0006.
When you have resolved this problem run "git-am --resolved".
If you would prefer to skip this patch, instead run "git-am --skip".


> NIC driver header files, h/w initialization function and
> driver entry points.

Need Signed-off-by.

General comments:

1.  See Documentation/Submit* for patch submittal guidelines.

2,  Run scripts/checkpatch.pl and try to eliminate the errors it
reports.  You might not reach zero errors, but you shouldn't have
hundreds like you do now.

3.  I highly recommend you use git.  It will greatly simplify your
patch submittals to lkml.

4.  Avoid typedefs (you have hundreds).

5.  Avoid bitfields.

6.  Reorder code to minimize forward declarations.

A few other comments inline below.

> 
> ------------------------------
> diff -uprN orig/linux-2.6.24.2/drivers/net/benet/be.h
> benet/linux-2.6.24.2/drivers/net/benet/be.h ---
> orig/linux-2.6.24.2/drivers/net/benet/be.h	1970-01-01
> 05:30:00.000000000 +0530 +++
> benet/linux-2.6.24.2/drivers/net/benet/be.h	2008-02-14
> 15:23:07.787208928 +0530 @@ -0,0 +1,373 @@ +/*
> + * Copyright (C) 2005 - 2008 ServerEngines
> + * All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or at your option any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> + * See the GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, 5th Floor
> + * Boston, MA 02110-1301 USA
> + *
> + *
> + * The full GNU General Public License is included in this
> distribution
> + * in the file called GPL.
> + *
> + * Contact Information:
> + * linux-drivers@serverengines.com
> + *
> + * ServerEngines
> + * 209 N. Fair Oaks Ave
> + * Sunnyvale, CA 94085
> + *
> + */
> +#ifndef _BE_H
> +#define _BE_H
> +
> +#include <linux/netdevice.h>
> +#include "bni.h"
> +
> +typedef union _PHYSICAL_ADDRESS {
> +	struct {
> +		u32 pa_lo;
> +		u32 pa_hi;
> +	};
> +	u64 pa;
> +} PHYSICAL_ADDRESS;
> +
> +#define BE_ETHERNET_FCS_SIZE    		4

include/linux/if_ether.h already provides some of these.

> +#define BE_ENET_HEADER_SIZE     		14
> +#define BE_VLAN_HEADER_SIZE     		4
> +#define BE_SNAP_HEADER_SIZE     		5
> +#define BE_HEADER_ETHERNET_II_802_3_SIZE 	14
> +#define BE_HEADER_802_2_SIZE    		3
> +#define BE_MIN_ETHER_FRAME_SIZE 		64
> +#define BE_MIN_SUPPORT_FRAME_SIZE 		256
> +#define BE_MAX_JUMBO_FRAME_SIZE 		9000
> +#define BE_MAXIMUM_ETHERNET_FRAME_SIZE  	1518	/*With
> FCS */ +
> +extern unsigned int dbg_mask;
> +extern unsigned int pm_resume;
> +
> +extern char be_drvr_ver[];
> +extern char be_fw_ver[];
> +extern char be_driver_name[];
> +
> +typedef enum {
> +	BE_DEVICE_1,
> +	BE_DEVICE_2,
> +	MAX_BE_DEVICES
> +} BE_DEVICE_NUM;
> +
> +typedef enum {
> +	BE_DEV_STATE_NONE,
> +	BE_DEV_STATE_INIT,
> +	BE_DEV_STATE_OPEN
> +} BE_DEV_STATE;
> +
> +#define BE_DEV_STATE_OPEN(adapter) (adapter->dev_state ==
> BE_DEV_STATE_OPEN) +
> +/*
> + * BE driver statistics.
> + */
> +struct _be_stat {
> +	u32 bes_tx_reqs;	/* number of TX requests initiated */
> +	u32 bes_tx_fails;	/* number of TX requests that
> failed */
> +	u32 bes_fwd_reqs;	/* number of send reqs through
> forwarding i/f */
> +	u32 bes_tx_wrbs;	/* number of tx WRBs used */
> +
> +	u32 bes_ints;		/* number of interrupts */
> +	u32 bes_polls;		/* number of times NAPI called
> poll function */
> +	u32 bes_events;		/* total evet entries
> processed */
> +	u32 bes_tx_events;	/* number of tx completion events
> */
> +	u32 bes_ucrx_events;	/* number of ucast rx completion
> events  */
> +	u32 bes_bcrx_events;	/* number of bcast rx completion
> events  */
> +	u32 bes_tx_compl;	/* number of tx completion entries
> processed */
> +	u32 bes_ucrx_compl;	/* number of ucrx completion
> entries
> +				   processed */
> +	u32 bes_bcrx_compl;	/* number of bcrx completion
> entries
> +				   processed */
> +	u32 bes_ethrx_post_fail;	/* number of ethrx buffer
> alloc
> +					   failures */
> +	/*
> +	 *
> +	 * number of non ether type II frames dropped where
> +	 * frame len > length field of Mac Hdr
> +	 */
> +	u32 bes_802_3_dropped_frames;
> +	/*
> +	 * number of non ether type II frames malformed where
> +	 * in frame len < length field of Mac Hdr
> +	 */
> +	u32 bes_802_3_malformed_frames;
> +	u32 bes_ips;		/*  interrupts / sec */
> +	u32 bes_prev_ints;	/* bes_ints at last IPS
> calculation  */
> +	u16 bes_eth_tx_rate;	/*  ETH TX rate - Mb/sec */
> +	u16 bes_eth_rx_rate;	/*  ETH RX rate - Mb/sec */
> +#ifdef RX_PKT_COALESCE
> +	u32 bes_rx_coal;	/* Num pkts coalasced */
> +	u32 bes_rx_flush;	/* Num times coalasced */
> +#endif
> +	u32 bes_link_change_physical;	/*Num of times physical
> link changed */
> +	u32 bes_link_change_virtual;	/*Num of times virtual
> link changed */ +};
> +
> +/* Macro to update RX/TX rates */
> +#define UPDATE_RATE(AP, JIF, BYTES, RATE)
> 				\
> +		if ((jiffies - AP->JIF) > 2*(HZ))
> { 			\
> +			u32
> r;						\
> +			r = AP->BYTES /
> ((jiffies-AP->JIF)/(HZ));	\
> +			r = (r / 1000000); /* MB/Sec
> */			\
> +			AP->be_stat.RATE = (r * 8); /* Mega Bits/Sec
> */	\
> +			AP->JIF =
> jiffies;				\
> +			AP->BYTES =
> 0;					\
> +		}
> +
> +/*
> + * Every second we look at the ints/sec and adjust eq_delay
> + * between AP->min_eqd and AP->max_eqd to keep the ints/sec between
> + * IPS_HI_WM and IPS_LO_WM.
> + */
> +#define IPS_HI_WM	18000
> +#define IPS_LO_WM	8000
> +#define UPDATE_IPS(AP, NP)
> 						\
> +		if ((jiffies - AP->ips_jiffies) > 1*(HZ))
> {		\
> +			/* One second elapsed since last
> update	 */	\
> +			u32 r, new_eqd =
> -1;				\
> +			if (AP->be_stat.bes_prev_ints >
> 		\
> +					AP->be_stat.bes_ints)
> {		\
> +				/* interrupt counter wrapped aroud
> */	\
> +				r = (0xFFFFFFFF -
> 			\
> +					AP->be_stat.bes_prev_ints)
> +	\
> +
> AP->be_stat.bes_ints;		\
> +			}
> \
> +
> else						\
> +				r = AP->be_stat.bes_ints -
> 		\
> +
> AP->be_stat.bes_prev_ints;	\
> +			r =  r / ((jiffies -
> AP->ips_jiffies)/(HZ));	\
> +			AP->be_stat.bes_ips =
> r;			\
> +			AP->ips_jiffies =
> jiffies;			\
> +			AP->be_stat.bes_prev_ints =
> 			\
> +
> AP->be_stat.bes_ints;	\
> +			if (r > IPS_HI_WM &&
> 				\
> +					AP->cur_eqd < AP->max_eqd)
> {	\
> +				/* increase eqdelay by a notch
> */	\
> +				new_eqd = (AP->cur_eqd +
> 8);		\
> +			}
> \
> +			if (r < IPS_LO_WM &&
> 				\
> +					AP->cur_eqd > AP->min_eqd)
> {	\
> +				/* decrease eqdelay by a notch
> */	\
> +				new_eqd = (AP->cur_eqd -
> 8);		\
> +			}
> \
> +			if (AP->enable_aic && new_eqd != -1)
> {		\
> +				/* program new delay
> */			\
> +				if (bni_change_eqd(NP, new_eqd) ==
> 	\
> +						BE_SUCCESS)
> 		\
> +					AP->cur_eqd =
> new_eqd;		\
> +			}
> \
> +		}
> +
> +#define FAIL	1
> +#define	SUCCESS	0
> +
> +#define MAX_EQD				120
> +
> +/*
> + * timer to prevent system shutdown hang for ever if h/w stops
> responding
> + */
> +typedef struct {
> +	atomic_t get_stat_flag;
> +	struct timer_list get_stats_timer;
> +	unsigned long get_stat_sem;	/* semaphore to wait  */
> +} be_timer_ctxt_t;
> +
> +#ifdef RX_PKT_COALESCE
> +#define MAX_COALESCE_SIZE	48*1024
> +#define MAX_COALESCE_FRAGS	(MAX_SKB_FRAGS - 1)
> +#define MAX_COALESCE_OBJECTS	8
> +/* struture to keep track of adjacent packets in a connection that
> + * can be colesced to a larger packet during RX completion
> processing.
> + */
> +struct be_coalesce_object {
> +	PBNI_NET_OBJECT pnob;
> +	struct sk_buff *skb;
> +	unsigned int frag_cnt;
> +	unsigned int next_pkt_seq;
> +	unsigned int next_ack_seq;
> +	unsigned int tcp_timestamp;
> +	unsigned int tcp_tsecr;
> +	unsigned int tcp_tsval;
> +	unsigned short sport;
> +	unsigned short dport;
> +	unsigned int saddr;
> +	unsigned int daddr;
> +	unsigned short last_seen_window;
> +	unsigned short mss;
> +	unsigned short vlant;
> +	unsigned short rsvd;
> +
> +};
> +#endif /* RX_PKT_COALESCE */
> +
> +/* This structure is the main BladeEngine driver context.  */
> +typedef struct _BE_ADAPTER {
> +	struct net_device *netdevp;
> +	struct _be_stat be_stat;
> +	struct net_device_stats benet_stats;
> +	u32 num_bars;
> +	SA_DEV_BAR_LOCATIONS pci_bars[3];	/* PCI BAR details
> */ +#ifdef CONFIG_PM
> +	u32 pci_state[16];
> +#endif
> +	SA_DEV sa_device;	/* device object owned by beclib */
> +	BE_CHIP_OBJECT chip_object;	/* BEClib chip object  */
> +
> +	struct tasklet_struct sts_handler;
> +	struct timer_list cq_timer;
> +	spinlock_t int_lock;
> +
> +	PIOCTL_ETH_GET_STATISTICS eth_statsp;
> +	/*
> +	 * This will enable the use of ethtool to enable or disable
> +	 * Checksum on Rx pkts to be obeyed or disobeyed.
> +	 * If this is TRUE = 1, then whatever is the checksum on the
> +	 * Received pkt as per BE, it will be given to the stack.
> +	 * Else the stack will re calculate it.
> +	 */
> +	BOOLEAN rx_csum;

Use bool, already provided in include/linux/types.h

> +#ifdef RX_PKT_COALESCE
> +	/*
> +	 * This will enable the use of ethtool to enable or disable
> +	 * Coalese on Rx pkts to be obeyed or disobeyed.
> +	 * If this is grater than 0 and less than 16 then coalascing
> +	 * is enabled else it is disabled
> +	 */
> +	u32 max_rx_coal;
> +#endif
> +	struct pci_dev *pdev;	/* Pointer to OS's PCI dvice */
> +
> +	spinlock_t txq_lock;
> +
> +	u32 isr;		/* copy of Intr status reg. */
> +
> +	u32 port0_link_sts;	/* Port 0 link status */
> +	u32 port1_link_sts;	/* port 1 list status */
> +	PBE_LINK_STATUS be_link_sts;
> +	PBNI_NET_OBJECT net_obj;
> +
> +	/*  Flags to indicate what to clean up */
> +	BOOLEAN tasklet_started;
> +	BOOLEAN isr_registered;
> +	/*
> +	 * adaptive interrupt coalescing (AIC) related
> +	 */
> +	u16 enable_aic;		/* 1 if AIC is enabled */
> +	u16 min_eqd;		/* minimum EQ delay in usec */
> +	u16 max_eqd;		/* minimum EQ delay in usec */
> +	u16 cur_eqd;		/* current EQ delay in usec */
> +	/*
> +	 * book keeping for interrupt / sec and TX/RX rate
> calculation
> +	 */
> +	ulong ips_jiffies;	/* jiffies at last IPS calc */
> +	u32 eth_tx_bytes;
> +	ulong eth_tx_jiffies;
> +	u32 eth_rx_bytes;
> +	ulong eth_rx_jiffies;
> +
> +	struct semaphore get_eth_stat_sem;
> +	be_timer_ctxt_t *ctxt;	/* context for get stats timer
> */ +
> +#define BE_MAX_MSIX_VECTORS             32
> +#define BE_MAX_REQ_MSIX_VECTORS         1
> +	struct msix_entry msix_entries[BE_MAX_MSIX_VECTORS];
> +	BOOLEAN msix_enabled;	/*MSI has been enabled */
> +	BOOLEAN dma_64bit_cap;	/* is the Device DAC capable */
> +	int be_fw_ver;		/* BE F/W version */
> +	BOOLEAN dev_state;	/* The current state of the device

bool

> */ +
> +} BE_ADAPTER, *PBE_ADAPTER;
> +
> +extern PBE_ADAPTER be_adapter[MAX_BE_DEVICES];
> +
> +typedef struct be_rx_page_info {
> +	struct page *page;
> +	dma_addr_t bus;
> +	u16 page_offset;
> +} BE_RX_PAGE_INFO;
> +
> +/*
> + * linux_net_object is an extension to BNI's NetObject structure.
> + * NetObject has a pointer to this structure
> + */
> +typedef struct {
> +	PVOID os_handle;	/* Context info for VMM */
> +	BNI_RECV_BUFFER eth_rx_bufs[256];	/* to pass Rx buffer
> +						   addresses */
> +	PBE_ADAPTER adapter;	/* Pointer to OSM adapter */
> +	u32 devno;		/* OSM, network dev no. */
> +	u32 use_port;		/* Current active port */
> +	BE_RX_PAGE_INFO *rx_page_info;	/* Array of Rx buf
> pages */
> +	u32 rx_pg_info_hd;	/* Head of queue */
> +	int rxbuf_post_fail;	/* RxBuff posting fail count */
> +	BOOLEAN rx_pg_shared;	/* Is an allocsted page shared
> as two frags ? */
> +	struct vlan_group *vlan_grp;
> +	u32 num_vlans;		/* Number of vlans in BE's
> filter */
> +	u16 vlan_tag[BE_NUM_VLAN_SUPPORTED]; /* vlans currently
> configured */ +#ifdef CONFIG_BENET_NAPI
> +	struct napi_struct napi;
> +	u32 work_quota;		/* Max RX packets to process
> */
> +	BOOLEAN rx_sched;

bool

> +	spinlock_t rx_lock;
> +#endif
> +#ifdef RX_PKT_COALESCE
> +	struct be_coalesce_object rxc_obj[MAX_COALESCE_OBJECTS];
> +	u32 num_coalesce_objects;
> +#endif
> +} linux_net_object_t;
> +
> +/* convenience macro to access members in Linux extension of
> NetObject */ +#define OSM_NOB(x)	((linux_net_object_t *)
> (x)->osm_netobj) +
> +/* proto declarations */

Please reorder your code to minimize the need for forward declarations.

> +
> +int benet_probe(struct net_device *netdev);
> +void be_set_ethtool_ops(struct net_device *netdev);
> +int be_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr);
> +struct net_device_stats *benet_get_stats(struct net_device *);
> +
> +int be_prepare_interface(PBE_ADAPTER adapter);
> +void cleanup_netobject(PBNI_NET_OBJECT);
> +void osm_process_sts(unsigned long context);
> +irqreturn_t be_int(int irq, PVOID dev, struct pt_regs *regs);
> +
> +int betx_ether_frame(PBE_ADAPTER pBeAdapter, PBNI_NET_OBJECT
> NetObject,
> +		     struct sk_buff *skb, u8 proto, u8 forward,
> +		     u16 lso_mss);
> +
> +void post_eth_rx_buffs(PBNI_NET_OBJECT NetObject);
> +void get_stat_cb(PVOID context, BESTATUS status, MCC_WRB
> *optional_wrb); +
> +void get_stats_timer_handler(unsigned long context);
> +
> +void enable_eq_intr(PBNI_NET_OBJECT pnob);
> +void disable_eq_intr(PBNI_NET_OBJECT pnob);
> +
> +void wait_nic_tx_cmpl(PBNI_NET_OBJECT pnob);
> +void be_print_link_info(PBE_LINK_STATUS lnk_status);
> +void be_update_link_status(PBE_ADAPTER adapter);
> +
> +void be_init_procfs(PBE_ADAPTER adapter);
> +void be_cleanup_procfs(PBE_ADAPTER adapter);
> +
> +#ifdef CONFIG_BENET_NAPI
> +int be_poll(struct napi_struct *napi, int budget);
> +#endif
> +#endif /* _BE_H */
> diff -uprN orig/linux-2.6.24.2/drivers/net/benet/bni.h
> benet/linux-2.6.24.2/drivers/net/benet/bni.h ---
> orig/linux-2.6.24.2/drivers/net/benet/bni.h	1970-01-01
> 05:30:00.000000000 +0530 +++
> benet/linux-2.6.24.2/drivers/net/benet/bni.h	2008-02-14
> 15:23:07.788208776 +0530 @@ -0,0 +1,374 @@ +/*
> + * Copyright (C) 2005 - 2008 ServerEngines
> + * All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or at your option any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> + * See the GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, 5th Floor
> + * Boston, MA 02110-1301 USA
> + *
> + *
> + * The full GNU General Public License is included in this
> distribution
> + * in the file called GPL.
> + *
> + * Contact Information:
> + * linux-drivers@serverengines.com
> + *
> + * ServerEngines
> + * 209 N. Fair Oaks Ave
> + * Sunnyvale, CA 94085
> + *
> + */
> +/*
> +
> +@file
> +    bni.h
> +
> +@brief
> +    Definitions and macros that are required for all .c files
> +    that use the BNI API and implement the BNI API functions
> +*/
> +#ifndef _BNI_H
> +#define _BNI_H
> +
> +#define _SA_MODULE_NAME "net-driver"
> +#include "beclib_ll.h"
> +
> +#define VLAN_VALID_BIT		0x8000
> +#define BE_NUM_VLAN_SUPPORTED	32
> +#define BE_PORT_LINK_DOWN       0000
> +#define BE_PORT_LINK_UP         0001
> +
> +typedef unsigned char BOOLEAN;

typedef, bool.

> +
> +#define TOU32(_struct_) *((u32 *)(&(_struct_)))
> +
> +/*
> + * DLs used by the Network driver. 0x00000000 to 0x00000800 are used
> + * by SA/BECLIB
> + */
> +typedef enum _NETD_DEBUG_LEVELS {
> +	DL_ERROR = DL_ERR,
> +	DL_EVENT = 0x00001000,
> +	DL_CQ = 0x00002000,
> +	DL_SEND = 0x00004000,
> +	DL_RECV = 0x00008000,
> +	DL_WINDOW = 0x00010000,
> +	DL_OFFLOAD = 0x00020000,
> +	DL_UPLOAD = 0x00040000,
> +	DL_VLAN = 0x00080000,
> +	DL_IPSEC = 0x00100000,
> +	DL_INT = 0x00200000,
> +	DL_PNP = 0x00400000,
> +	DL_ETH_INFO = 0x00800000,
> +	DL_TIMER = 0x01000000,
> +	DL_INIT = 0x02000000,
> +	DL_SHUTDOWN = 0x04000000,
> +} NET_DEBUG_LEVELS;
> +
> +/*
> + * Structure to return Ethernet statistics counters maintained by BE.
> + * Defined in srcgen.
> + */
> +typedef BE_RXF_STATS BLADE_ETH_STATS, *PBLADE_ETH_STATS;
> +
> +/*
> +@brief
> +    This structure is used by the OSM driver to give BNI
> +    physical fragments to use for DMAing data from NIC.
> +*/
> +typedef struct _BNI_RECV_BUFFER {
> +	SA_LIST_ENTRY rxb_list;	/* for maintaining a linked
> list */
> +	PVOID rxb_va;		/* buffer virtual address */
> +	u32 rxb_pa_lo;		/* low part of physical
> address */
> +	u32 rxb_pa_hi;		/* high part of physical
> address */
> +	u32 rxb_len;		/* length of recv buffer */
> +	PVOID rxb_ctxt;		/* context for OSM driver to
> use */ +} BNI_RECV_BUFFER, *PBNI_RECV_BUFFER;
> +
> +/*
> + * fragment list to describe scattered data.
> + */
> +typedef struct _BNI_TX_FRAG_LIST {
> +	u32 txb_len;		/* Size of this fragment */
> +	u32 txb_pa_lo;		/* Lower 32 bits of 64 bit
> physical addr */
> +	u32 txb_pa_hi;		/* Higher 32 bits of 64 bit
> physical addr */ +} BNI_TX_FRAG_LIST, *PBNI_TX_FRAG_LIST;
> +/*
> + * maximum fragements in a TX request
> + */
> +#define	BE_MAX_TX_FRAG_COUNT		(30)
> +
> +/*
> + * Flag bits for send operation
> + */
> +#define IPCS            (1 << 0)	/* Enable IP checksum
> offload */ +#define UDPCS           (1 << 1)	/* Enable UDP
> checksum offload */ +#define TCPCS           (1 << 2)	/*
> Enable TCP checksum offload */ +#define LSO             (1 <<
> 3)	/* Enable Large Segment  offload */ +#define
> ETHVLAN         (1 << 4)	/* Enable VLAN insert */ +#define
> ETHEVENT        (1 << 5)	/* Generate  event on completion */
> +#define ETHCOMPLETE     (1 << 6)	/* Generate completion when
> done */ +#define IPSEC           (1 << 7)	/* Enable IPSEC */
> +#define FORWARD         (1 << 8)	/* Send the packet in
> forwarding path */ +#define FIN             (1 << 9)	/* Issue
> FIN segment */ + +/* @brief
> + *  This structure is the main tracking structure for a NIC
> interface.
> + *  This data structure contains OS agnostic data members for
> processing
> + *  intialization, sends, receives, and asynchronous events from the
> + *  BladeEngine network function. The OSM driver makes
> + *  calls into functions defined at this layer for initialization,
> + *  eumeration and population of physical fragments with per-packet
> + *  control flags for send and receive operations, population of
> + *  receive buffers for NIC , and handling asynchronous
> + *  events (such as link status change, packet pattern recognition
> etc.).
> + */
> +typedef struct _BNI_NET_OBJECT {
> +
> +	/*
> +	 * MCC Ring - used to send ioctl cmds to embedded ARM
> processor
> +	 */
> +	PMCC_WRB mcc_q;			/* VA of the start of
> the ring */
> +	u32 mcc_q_len;			/* # of WRB entries in
> this ring */
> +	u32 mcc_q_hd;			/* MCC ring head */
> +	u8 mcc_q_created;		/* flag to help cleanup */
> +	u8 mcc_q_pages;			/* Num of pages
> allocacted by OSM */
> +	BE_MCC_OBJECT mcc_q_obj;	/* BECLIB's MCC ring Object
> */
> +	SA_PHYSICAL_ADDRESS mcc_q_pa;	/* Physical address in
> LE order */
> +	/*
> +	 * MCC Completion Ring - ARM's responses to ioctls sent from
> MCC ring
> +	 */
> +	PMCC_CQ_ENTRY mcc_cq;		/* VA of the start of
> the ring */
> +	u32 mcc_cq_len;			/* # of compl.
> entries in this ring */
> +	u32 mcc_cq_tl;			/* compl. ring tail */
> +	u8 mcc_cq_created;		/* flag to help cleanup */
> +	u8 mcc_cq_pages;		/* Num of pages allocacted
> by OSM */
> +	BE_CQ_OBJECT mcc_cq_obj;	/* BECLIB's MCC compl. ring
> object */
> +	u32 mcc_cq_id;			/* MCC ring ID */
> +	SA_PHYSICAL_ADDRESS mcc_cq_pa;	/* Physical address in
> LE order */
> +	/*
> +	 * BEClib uses an array of context objects to track
> outstanding
> +	 * requests to the MCC.  We need allocate the same number of
> +	 * conext entries as the number of entries in the MCC WRB
> ring
> +	 */
> +	u8 mcc_wrb_ctxt_pages;		/* Num of pages
> allocacted by OSM */
> +	PVOID mcc_wrb_ctxt;		/* pointer to the context
> area */
> +	u32 mcc_wrb_ctxtLen;		/* Number of entries in
> the context */
> +	/*
> +	 * NIC send request ring - used for xmitting raw ether
> frames.
> +	 */
> +	PETH_WRB tx_q;			/* VA of the start of
> the ring */
> +	u32 tx_q_len;			/* # if entries in the
> send ring */
> +	u32 tx_q_hd;			/* Head index. Next req.
> goes here */
> +	u32 tx_q_tl;			/* Tail indx. oldest
> outstanding req. */
> +	u8 tx_q_created;		/* flag to help cleanup */
> +	u8 tx_q_pages;			/* Num of pages
> allocacted by OSM */
> +	BE_ETHSQ_OBJECT tx_q_obj;	/* BECLIB's send Q handle */
> +	SA_PHYSICAL_ADDRESS tx_q_pa;	/* Physical address in
> LE order */
> +	u32 tx_q_id;			/* send queue ring ID */
> +	u32 tx_q_port;			/* 0 no binding, 1
> port A,  2 port B */ +
> +	u32 tx_q_used;			/* # of WRBs used */
> +	/* ptr to an array in which we store context info for each
> send req. */
> +	PVOID *tx_ctxt;
> +	/*
> +	 * NIC Send compl. ring - completion status for all NIC
> frames xmitted.
> +	 */
> +	PETH_TX_COMPL tx_cq;		/* VA of start of the
> ring */
> +	u32 txcq_len;			/* # of entries in the
> ring */
> +	/*
> +	 * index into compl ring where the host expects next
> completion entry
> +	 */
> +	u32 tx_cq_tl;
> +	u32 tx_cq_id;			/* completion queue id
> */
> +	u8 tx_cq_created;		/* flag to help cleanup */
> +	u8 tx_cq_pages;			/* Num of pages
> allocacted by OSM */
> +	BE_CQ_OBJECT tx_cq_obj;
> +	SA_PHYSICAL_ADDRESS tx_cq_pa;	/* Physical address in
> LE order */
> +	/*
> +	 * Event Queue - all completion entries post events here.
> +	 */
> +	PEQ_ENTRY event_q;		/* VA of start of event
> queue */
> +	u32 event_q_len;		/* # of entries */
> +	u32 event_q_tl;			/* Tail of the event
> queue */
> +	u32 event_q_id;			/* Event queue ID */
> +	u8 event_q_created;		/* flag to help cleanup */
> +	u8 event_q_pages;		/* Num of pages allocacted
> by OSM */
> +	BE_EQ_OBJECT event_q_obj;	/* Queue handle */
> +	SA_PHYSICAL_ADDRESS event_q_pa;	/* Physical address
> in LE order */
> +	/*
> +	 * NIC receive queue - Data buffers to be used for receiving
> unicast,
> +	 * broadcast and multi-cast frames  are posted here.
> +	 */
> +	PETH_RX_D rx_q;			/* VA of start of the
> queue */
> +	u32 rx_q_len;			/* # of entries */
> +	u32 rx_q_hd;			/* Head of the queue */
> +	u32 rx_q_posted;		/* number of posted buffers
> */
> +	u32 rx_q_id;			/* queue ID */
> +	u8 rx_q_created;		/* flag to help cleanup */
> +	u8 rx_q_pages;			/* Num of pages
> allocacted by OSM */
> +	BE_ETHRQ_OBJECT rx_q_obj;	/* NIC RX queue handle */
> +	SA_PHYSICAL_ADDRESS rx_q_pa;	/* Physical address */
> +	/*
> +	 * Pointer to an array of opaque context object for use by
> OSM driver
> +	 */
> +	PVOID *rx_ctxt;
> +	/*
> +	 * NIC unicast RX completion queue - all unicast ether frame
> completion
> +	 * statuses from BE come here.
> +	 */
> +	PETH_RX_COMPL ucrx_cq;		/* VA of start of the
> queue */
> +	u32 ucrx_cq_len;		/* # of entries */
> +	u32 ucrx_cq_tl;			/* Tail of the queue
> */
> +	u32 ucrx_cq_id;			/* queue ID */
> +	u8 ucrx_cq_created;		/* flag to help cleanup */
> +	u8 ucrx_cq_pages;		/* Num of pages allocacted
> by OSM */
> +	BE_CQ_OBJECT ucrx_cq_obj;	/* queue handle */
> +	SA_PHYSICAL_ADDRESS ucrx_cq_pa;	/* Physical address
> in LE order */
> +	/*
> +	 * Broadcast RX completion queue - all broadcast and
> multicast ether
> +	 * completion statues from BE come here.
> +	 */
> +	PETH_RX_COMPL bcrx_cq;		/* VA of start of
> queue */
> +	u32 bcrx_cq_len;		/* # of entries */
> +	u32 bcrx_cq_tl;			/* Tail of the queue
> */
> +	u32 bcrx_cq_id;			/* Queue ID */
> +	u8 bcrx_cq_created;		/* flag to help cleanup */
> +	u8 bcrx_cq_pages;		/* Num of pages allocacted
> by OSM */
> +	BE_CQ_OBJECT bcrx_cq_obj;	/* queue handle */
> +	SA_PHYSICAL_ADDRESS bcrx_cq_pa;	/* Physical address
> in LE order */ +
> +	BE_FUNCTION_OBJECT fn_obj;	/* function object   */
> +	u32 rx_buf_size;		/* Size of the RX buffers */
> +	u8 mac_address[6];		/* MAC address */
> +	/*
> +	 * OSM handle. OSM drivers can use this pointer to extend
> NetObject.
> +	 */
> +	PVOID osm_netobj;
> +	SA_SGL mb_sgl;			/* SGL for
> MCC_MAIL_BOX */
> +	PVOID mb_ptr;			/* mailbox ptr to be
> freed  */ +} BNI_NET_OBJECT, *PBNI_NET_OBJECT;
> +
> +/*
> + * convenience macros to access some NetObject members
> + */
> +#define NET_FH(np)       (&(np)->fn_obj)
> +
> +/*
> + * Functions to advance the head and tail in various rings.
> + */
> +static INLINE void bni_adv_eq_tl(PBNI_NET_OBJECT pnob)
> +{
> +	pnob->event_q_tl = (pnob->event_q_tl + 1) %
> pnob->event_q_len; +}
> +
> +static INLINE void bni_adv_txq_hd(PBNI_NET_OBJECT pnob)
> +{
> +	pnob->tx_q_hd = (pnob->tx_q_hd + 1) % pnob->tx_q_len;
> +}
> +
> +static INLINE void bni_adv_txq_tl(PBNI_NET_OBJECT pnob)
> +{
> +	pnob->tx_q_tl = (pnob->tx_q_tl + 1) % pnob->tx_q_len;
> +}
> +
> +static INLINE void bni_adv_txcq_tl(PBNI_NET_OBJECT pnob)
> +{
> +	pnob->tx_cq_tl = (pnob->tx_cq_tl + 1) % pnob->txcq_len;
> +}
> +
> +static INLINE void bni_adv_rxq_hd(PBNI_NET_OBJECT pnob)
> +{
> +	pnob->rx_q_hd = (pnob->rx_q_hd + 1) % pnob->rx_q_len;
> +}
> +
> +static INLINE void bni_adv_ucrxcq_tl(PBNI_NET_OBJECT pnob)
> +{
> +	pnob->ucrx_cq_tl = (pnob->ucrx_cq_tl + 1) %
> pnob->ucrx_cq_len; +}
> +
> +static INLINE void bni_adv_bcrxcq_tl(PBNI_NET_OBJECT pnob)
> +{
> +	pnob->bcrx_cq_tl = (pnob->bcrx_cq_tl + 1) %
> pnob->bcrx_cq_len; +}
> +
> +static INLINE BESTATUS bni_process_mcc_cmpl(BE_MCC_OBJECT *pMccObj)
> +{
> +	return (be_mcc_process_cq(pMccObj, 1));
> +}
> +
> +/* forward declarations of function prototypes */
> +BESTATUS bni_init(PBE_CHIP_OBJECT);
> +BESTATUS bni_create_mcc_rings(PBNI_NET_OBJECT pnob);
> +extern void bni_destroy_netobj(PBNI_NET_OBJECT, SA_DEV *);
> +void bni_cleanup(PBE_CHIP_OBJECT chipobj);
> +
> +BESTATUS bni_create_netobj(PBNI_NET_OBJECT, SA_DEV_BAR_LOCATIONS *,
> u32,
> +			   SA_DEV *, PBE_CHIP_OBJECT);
> +
> +BESTATUS bni_tx_pkt(PBNI_NET_OBJECT, PBNI_TX_FRAG_LIST, u32,
> +		    u32, u32, void *, u32);
> +void bni_start_tx(PBNI_NET_OBJECT, u32);
> +
> +u32 bni_post_rx_buffs(PBNI_NET_OBJECT, PSA_LIST_ENTRY);
> +BESTATUS bni_change_eqd(PBNI_NET_OBJECT, u32);
> +
> +PETH_TX_COMPL bni_get_tx_cmpl(PBNI_NET_OBJECT);
> +PETH_RX_COMPL bni_get_ucrx_cmpl(PBNI_NET_OBJECT);
> +PETH_RX_COMPL bni_get_bcrx_cmpl(PBNI_NET_OBJECT);
> +void bni_notify_cmpl(PBNI_NET_OBJECT, int, int, int);
> +
> +void bni_enable_intr(PBNI_NET_OBJECT);
> +void bni_enable_eq_intr(PBNI_NET_OBJECT);
> +void bni_disable_intr(PBNI_NET_OBJECT);
> +void bni_disable_eq_intr(PBNI_NET_OBJECT);
> +
> +u32 bni_get_isr(PBNI_NET_OBJECT);
> +
> +PEQ_ENTRY bni_get_event(PBNI_NET_OBJECT);
> +void bni_notify_event(PBNI_NET_OBJECT, int, int);
> +
> +BESTATUS bni_get_uc_mac_adrr(PBNI_NET_OBJECT, u8, u8, u8 Pd,
> +			     PSA_MAC_ADDRESS macAddr,
> +			     MCC_WRB_CQE_CALLBACK cbf, PVOID cbc);
> +
> +BESTATUS bni_set_uc_mac_adr(PBNI_NET_OBJECT, u8, u8, u8 Pd,
> +			    PSA_MAC_ADDRESS macAddr,
> +			    MCC_WRB_CQE_CALLBACK cbf, PVOID cbc);
> +
> +BESTATUS bni_set_mc_filter(PBNI_NET_OBJECT pnob, u32 NumMac,
> +			   BOOLEAN Promiscuous,
> +			   PSA_MAC_ADDRESS macAddr,
> +			   MCC_WRB_CQE_CALLBACK cbf, PVOID cbc);
> +
> +void bni_set_promisc(PBNI_NET_OBJECT pnob);
> +void bni_reset_promisc(PBNI_NET_OBJECT pnob);
> +BESTATUS bni_config_vlan(PBNI_NET_OBJECT pnob, u16 *VlanId,
> +			 u32 numVlans, MCC_WRB_CQE_CALLBACK cbf,
> +			 PVOID cbc, BOOLEAN Promiscuous);
> +
> +BESTATUS bni_get_stats(PBNI_NET_OBJECT pnob,
> +		       IOCTL_ETH_GET_STATISTICS *ioctl_va,
> +		       u64 ioctl_pa, MCC_WRB_CQE_CALLBACK cbf, PVOID
> cbc); +
> +BESTATUS bni_get_link_sts(PBNI_NET_OBJECT pnob,
> +			  PBE_LINK_STATUS be_link_sts,
> +			  MCC_WRB_CQE_CALLBACK cbf, PVOID cbc);
> +BESTATUS bni_set_flow_ctll(PBE_FUNCTION_OBJECT pFnObj, boolean
> txfc_enable,
> +			   boolean rxfc_enable);
> +BESTATUS bni_get_flow_ctl(PBE_FUNCTION_OBJECT pFnObj,
> +			  boolean *txfc_enable, boolean
> *rxfc_enable); +u32 bni_process_rx_flush_cmpl(PBNI_NET_OBJECT pnob);
> +
> +#endif /* #ifndef _BNI_H_ */
> diff -uprN orig/linux-2.6.24.2/drivers/net/benet/be_init.c
> benet/linux-2.6.24.2/drivers/net/benet/be_init.c ---
> orig/linux-2.6.24.2/drivers/net/benet/be_init.c	1970-01-01
> 05:30:00.000000000 +0530 +++
> benet/linux-2.6.24.2/drivers/net/benet/be_init.c	2008-02-14
> 15:29:34.088482208 +0530 @@ -0,0 +1,1426 @@ +/*
> + * Copyright (C) 2005 - 2008 ServerEngines
> + * All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or at your option any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> + * See the GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, 5th Floor
> + * Boston, MA 02110-1301 USA
> + *
> + *
> + * The full GNU General Public License is included in this
> distribution
> + * in the file called GPL.
> + *
> + * Contact Information:
> + * linux-drivers@serverengines.com
> + *
> + * ServerEngines
> + * 209 N. Fair Oaks Ave
> + * Sunnyvale, CA 94085
> + *
> + */
> +
> +#include <linux/pci.h>
> +#include <linux/etherdevice.h>
> +
> +#include "be.h"
> +
> +#define  DRVR_VERSION  "1.0.688"
> +
> +static struct pci_device_id be_device_id_table[] = {
> +	{0x19a2, 0x0201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
> +	{0, 0, 0, 0, 0, 0, 0}
> +};
> +
> +MODULE_DEVICE_TABLE(pci, be_device_id_table);
> +
> +MODULE_VERSION(DRVR_VERSION);
> +
> +#define DRV_DESCRIPTION "ServerEngines BladeEngine Network Driver
> Version " \
> +			DRVR_VERSION
> +
> +MODULE_DESCRIPTION(DRV_DESCRIPTION);
> +MODULE_AUTHOR("ServerEngines");
> +MODULE_LICENSE("GPL");
> +
> +unsigned int dbg_mask = (DL_ALWAYS | DL_ERR);	/* always show
> error messages */ +unsigned int msix;		/*By default  */
> +unsigned int ls_mss = (60 * 1024);
> +
> +unsigned int rxbuf_size = 2048;	/*Size of Receive buffers
> posted  */ +
> +module_param(msix, uint, (0 | 1));
> +module_param(dbg_mask, uint, (DL_ALWAYS | DL_ERR));
> +module_param(rxbuf_size, uint, 0);
> +
> +MODULE_PARM_DESC(msix, "Use MSI-x interrupts");
> +MODULE_PARM_DESC(dbg_mask, "Debug mask");
> +MODULE_PARM_DESC(rxbuf_size, "Size of buffers to hold Rx data");
> +
> +static int be_probe(struct pci_dev *, const struct pci_device_id *);
> +static void be_remove(struct pci_dev *);
> +
> +#ifdef CONFIG_PM
> +static void be_pm_cleanup(PBE_ADAPTER, PBNI_NET_OBJECT,
> +			  struct net_device *);
> +static void be_up(PBE_ADAPTER);
> +static int be_resume(struct pci_dev *);
> +
> +static int be_suspend(struct pci_dev *, pm_message_t);
> +#endif
> +
> +int be_mcc_init(PBE_ADAPTER adapter);
> +void be_update_link_status(PBE_ADAPTER adapter);
> +void be_link_status_async_callback(PVOID context, u32 event_code,
> +				   PVOID event);
> +
> +char be_drvr_ver[] = DRVR_VERSION;
> +char be_fw_ver[32];		/* F/W version filled in by
> be_probe */ +
> +char be_driver_name[] = "benet";
> +
> +static struct pci_driver be_driver = {
> +      name:be_driver_name,
> +      id_table:be_device_id_table,
> +      probe:be_probe,
> +#ifdef CONFIG_PM
> +      suspend:be_suspend,
> +      resume:be_resume,
> +#endif
> +      remove:be_remove
> +};
> +
> +/*
> + * Number of entries in each queue.
> + */
> +#define EVENT_Q_LEN		1024
> +#define ETH_TXQ_LEN		2048
> +#define ETH_TXCQ_LEN		1024
> +#define ETH_RXQ_LEN		1024	/* Does not support
> any other value */ +#define ETH_UC_RXCQ_LEN		1024
> +#define ETH_BC_RXCQ_LEN		256
> +#define MCC_Q_LEN               64	/* total size not to
> exceed 8 pages */ +#define MCC_CQ_LEN              256
> +
> +PBE_ADAPTER be_adapter[MAX_BE_DEVICES];
> +
> +/*
> + * Intialize and register a network device for the NetObject.
> + */
> +static int init_be_netdev(PBE_ADAPTER adapter, PBNI_NET_OBJECT pnob)
> +{
> +	struct net_device *netdev;
> +	int ret = 0;
> +	unsigned char *p;
> +
> +#ifdef CONFIG_PM
> +	if (pm_resume) {
> +		bni_set_uc_mac_adr(pnob, 0, 0, 0,
> +				   (PSA_MAC_ADDRESS)
> pnob->mac_address,
> +				   NULL, NULL);
> +		return 0;
> +	}
> +#endif
> +
> +	/*
> +	 * Allocate netdev. No private data structure is
> +	 * allocated with netdev
> +	 */
> +	netdev = alloc_etherdev(0);
> +	if (netdev == NULL)
> +		return -ENOMEM;
> +
> +	p = (u8 *) (pnob->mac_address);
> +	/*
> +	 * Get MAC address from receive table
> +	 */
> +	bni_get_uc_mac_adrr(pnob, 0, 0, OSM_NOB(pnob)->devno,
> +		(PSA_MAC_ADDRESS) pnob->mac_address, NULL, NULL);
> +
> +	memcpy(netdev->dev_addr, pnob->mac_address, 6);
> +	netdev->priv = pnob;	/* We use the Net Object as
> private data */
> +	netdev->init = &benet_probe;
> +	/*
> +	 * Initialize to No Link.  Link will be enabled during
> +	 * benet_open() or when physical Link is up
> +	 */
> +	netif_carrier_off(netdev);
> +	netif_stop_queue(netdev);
> +
> +	strcpy(netdev->name, "eth%d");
> +
> +	SET_NETDEV_DEV(netdev, &(adapter->pdev->dev));
> +	ret = register_netdev(netdev);
> +	if (ret != 0) {
> +		TRACE(DL_INIT,
> +		      "Netdevice registration failed - Errno %d\n",
> ret);
> +		free_netdev(netdev);
> +		return (ret);
> +	}
> +	OSM_NOB(pnob)->os_handle = netdev;
> +	return ret;
> +}
> +
> +/* Initialize the pci_info structure for this function */
> +static int init_pci_be_function(PBE_ADAPTER adapter, struct pci_dev
> *pdev) +{
> +	adapter->num_bars = 3;
> +	/* CSR */
> +	adapter->pci_bars[0].base_pa = pci_resource_start(pdev, 2);
> +	adapter->pci_bars[0].base_va =
> +	    ioremap_nocache(adapter->pci_bars[0].base_pa,
> +			    pci_resource_len(pdev, 2));
> +	if (adapter->pci_bars[0].base_va == NULL)
> +		return -ENOMEM;
> +	adapter->pci_bars[0].length = sizeof(BLADE_ENGINE_CSRMAP);
> +	adapter->pci_bars[0].mem_or_io_mapped = SA_MEM_MAPPED;
> +	adapter->pci_bars[0].type = SA_BAR_TYPE_CSR;
> +
> +	/* Door Bell */
> +	adapter->pci_bars[1].base_pa = pci_resource_start(pdev, 4);
> +	adapter->pci_bars[1].base_va =
> +	    ioremap_nocache(adapter->pci_bars[1].base_pa, (128 *
> 1024));
> +	if (adapter->pci_bars[1].base_va == NULL) {
> +		iounmap(adapter->pci_bars[0].base_va);
> +		return -ENOMEM;
> +	}
> +	adapter->pci_bars[1].length =
> sizeof(PROTECTION_DOMAIN_DBMAP);
> +	adapter->pci_bars[1].mem_or_io_mapped = SA_MEM_MAPPED;
> +	adapter->pci_bars[1].type = SA_BAR_TYPE_PD;
> +
> +	/* PCI */
> +	adapter->pci_bars[2].base_pa = pci_resource_start(pdev, 1);
> +	adapter->pci_bars[2].length = pci_resource_len(pdev, 1);
> +	adapter->pci_bars[2].base_va =
> +	    ioremap_nocache(adapter->pci_bars[2].base_pa,
> +			    adapter->pci_bars[2].length);
> +	if (adapter->pci_bars[2].base_va == NULL) {
> +		iounmap(adapter->pci_bars[0].base_va);
> +		iounmap(adapter->pci_bars[1].base_va);
> +		return -ENOMEM;
> +	}
> +	adapter->pci_bars[2].mem_or_io_mapped = SA_MEM_MAPPED;
> +	adapter->pci_bars[2].type = SA_BAR_TYPE_PCI;
> +
> +	adapter->pdev = pdev;
> +
> +	return 0;
> +}
> +
> +/*
> + * Enable MSIx and return 1 if successful. Else return 0
> + */
> +int be_enable_msix(PBE_ADAPTER adapter)
> +{
> +	unsigned int i, ret;
> +
> +	if (!msix)
> +		return 0;
> +
> +	adapter->msix_enabled = 1;
> +
> +	for (i = 0; i < BE_MAX_REQ_MSIX_VECTORS; i++) {
> +		adapter->msix_entries[i].entry = i;
> +	}
> +
> +	ret = pci_enable_msix(adapter->pdev,
> +			      adapter->msix_entries,
> +			      BE_MAX_REQ_MSIX_VECTORS);
> +
> +	if (ret) {
> +		adapter->msix_enabled = 0;
> +		return 0;
> +	}
> +
> +	return 1;
> +}
> +
> +/*
> + * Module init entry point. Registers our our device and return.
> + * Our probe will be called if the device is found.
> + */
> +
> +static int __init be_init_module(void)
> +{
> +	int ret;
> +
> +	if ((rxbuf_size != 8192) && (rxbuf_size != 4096)
> +	    && (rxbuf_size != 2048)) {
> +		printk(KERN_WARNING
> +		       "Unsupported receive buffer size (%d)
> requested\n",
> +		       rxbuf_size);
> +		printk(KERN_WARNING
> +		       "Must be 2048 or 4096. Defaulting to 2048\n");

You also allow 8192.  Intentional?

> +		rxbuf_size = 2048;
> +	}
> +
> +	ret = pci_register_driver(&be_driver);
> +	TRACE(DL_INIT, "pci_module_init returned %d", ret);
> +
> +	return ret;
> +}
> +
> +module_init(be_init_module);
> +
> +/*
> + * be_exit_module - Driver Exit Cleanup Routine
> + */
> +static void __exit be_exit_module(void)
> +{
> +	TRACE(DL_SHUTDOWN, "%s Entry\n", __FUNCTION__);
> +
> +	pci_unregister_driver(&be_driver);
> +}
> +
> +module_exit(be_exit_module);
> +
> +/*
> + * Registers ISR for BE. Uses MSIx interrupt if configured and
> requested.
> + * If not, uses INTx interrupt. Returns 0 for success and -1 for
> filure.
> + */
> +int register_isr(PBE_ADAPTER adapter, PBNI_NET_OBJECT pnob)
> +{
> +	int msix_intr, r;
> +	struct net_device *netdev = OSM_NOB(pnob)->os_handle;
> +	u32 msix_ret = 0;
> +
> +	netdev->irq = adapter->pdev->irq;
> +
> +	msix_intr = 0;
> +	msix_ret = be_enable_msix(adapter);
> +	if (msix_ret) {
> +		/* Register MSIx Interrupt handler */
> +		r = request_irq(adapter->msix_entries[0].vector,
> +				(void *)be_int, IRQF_SHARED,
> +				netdev->name, netdev);
> +		if (r) {
> +			printk(KERN_WARNING
> +			       "MSIX Request IRQ failed - Errno
> %d\n", r);
> +		} else {
> +			msix_intr = 1;
> +			TRACE(DL_INIT, "MSIx IRQ %d for %s\n",
> +			      adapter->msix_entries[0].vector,
> +			      netdev->name);
> +		}
> +	}
> +	if (msix_intr == 0) {
> +		/* request legacy INTx interrupt */
> +		r = request_irq(netdev->irq, (void *)be_int,
> +				IRQF_SHARED, netdev->name, netdev);
> +		if (r) {
> +			printk(KERN_ERR
> +			       "INTx Request IRQ failed - Errno
> %d\n", r);
> +			return (-1);
> +		}
> +		TRACE(DL_INIT, "BE: INTx IRQ %d for %s\n",
> +		      netdev->irq, netdev->name);
> +	}
> +	return (0);
> +}
> +
> +/*
> + * This function is called by the PCI sub-system when it finds a PCI
> + * device with dev/vendor IDs that match with one of our devices.
> + * All of the driver initialization is done in this function.
> + */
> +static int be_probe(struct pci_dev *pdev,
> +		    const struct pci_device_id *pdev_id)
> +{
> +	int status = 0;
> +	PBE_ADAPTER adapter = NULL;
> +	u32 r;
> +	u32 adapt_num = 0;
> +	IOCTL_COMMON_GET_FW_VERSION_RESPONSE_PAYLOAD ioctl_pload;
> +	PBNI_NET_OBJECT pnob = NULL;
> +
> +	TRACE(DL_INFO, "Entering probe");
> +	while (adapt_num < MAX_BE_DEVICES) {
> +		if (!be_adapter[adapt_num])
> +			break;
> +		adapt_num++;
> +	}
> +
> +	if (adapt_num == MAX_BE_DEVICES) {
> +		printk(KERN_WARNING "Cannot support more than %d BE
> Adapters",
> +		       MAX_BE_DEVICES);
> +		return -1;
> +	}
> +
> +	status = pci_enable_device(pdev);
> +	if (status) {
> +		printk(KERN_ERR "pci_enable_device() for BE adapter
> %d failed",
> +		       adapt_num);
> +		return status;
> +	}
> +
> +	status = pci_request_regions(pdev, be_driver_name);
> +	if (status)
> +		return status;
> +
> +	pci_set_master(pdev);
> +
> +	adapter = (PBE_ADAPTER) kmalloc(sizeof(BE_ADAPTER),
> GFP_KERNEL);
> +	if (adapter == NULL) {
> +		TRACE(DL_INIT,
> +		      "Failed to alloc memory for adapter
> structure\n");
> +		pci_release_regions(pdev);
> +		goto err_ret;
> +	}
> +
> +	memset(adapter, 0, sizeof(BE_ADAPTER));

If you use kzalloc, you won't need the memset.

> +
> +	be_adapter[adapt_num] = adapter;
> +	/*
> +	 * Adapative interrupt coalescing limits in usecs.
> +	 * should be a multiple of 8.
> +	 */
> +	adapter->enable_aic = 1;
> +	adapter->max_eqd = MAX_EQD;
> +	adapter->min_eqd = 0;
> +	adapter->cur_eqd = 0;	/* start with no EQ delay */
> +	r = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
> +	if (!r) {
> +		/* Device is DAC Capable.  */
> +		adapter->dma_64bit_cap = TRUE;
> +	} else {
> +		adapter->dma_64bit_cap = FALSE;
> +		r = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
> +		if (r) {
> +			printk(KERN_ERR "Could not set PCI DMA
> Mask\n");
> +			return r;
> +		}
> +	}
> +
> +	status = init_pci_be_function(adapter, pdev);
> +	if (status < 0) {
> +		printk(KERN_ERR "Failed to map PCI BARS\n");
> +		status = -ENOMEM;
> +		goto cleanup1;
> +	}
> +
> +	(void)sa_trace_set_level(dbg_mask);
> +
> +	r = bni_init(&adapter->chip_object);
> +	if (r != 0) {
> +		printk("bni_init() failed - Error %d\n", r);
> +		goto cleanup1;
> +	}
> +
> +	/* Allocate Memory for getting the Link status */
> +	adapter->be_link_sts = (PBE_LINK_STATUS)
> +	    kmalloc(sizeof(BE_LINK_STATUS), GFP_KERNEL);
> +	if (adapter->be_link_sts == NULL) {
> +		printk("Memory allocation for link status buffer
> failed\n");

Add log level.

> +		goto cleanup1;
> +	}
> +	spin_lock_init(&adapter->txq_lock);
> +
> +	status = be_prepare_interface(adapter);
> +	if (status < 0) {
> +		goto cleanup1;
> +	}
> +	pnob = adapter->net_obj;
> +
> +	/* if the rx_frag size if 2K, one page is shared as two RX
> frags */
> +	OSM_NOB(pnob)->rx_pg_shared =
> +			(pnob->rx_buf_size <= PAGE_SIZE / 2) ?
> TRUE : FALSE;
> +	if (pnob->rx_buf_size != rxbuf_size) {
> +		printk(KERN_WARNING
> +		       "Could not set Rx buffer size to %d. Using
> %d\n",
> +		       rxbuf_size, pnob->rx_buf_size);
> +		rxbuf_size = pnob->rx_buf_size;
> +	}
> +
> +	tasklet_init(&(adapter->sts_handler), osm_process_sts,
> +		     (unsigned long)adapter);
> +	adapter->tasklet_started = 1;	/* indication to
> cleanup */
> +	spin_lock_init(&(adapter->int_lock));
> +
> +	if (register_isr(adapter, pnob) != 0)
> +		goto cleanup;
> +
> +	adapter->isr_registered = 1;
> +	adapter->rx_csum = 1;	/* enable RX checksum check */
> +#ifdef RX_PKT_COALESCE
> +	adapter->max_rx_coal = MAX_COALESCE_FRAGS;
> +#endif
> +
> +	/* print the version numbers */
> +	memset(&ioctl_pload, 0,
> +	       sizeof(IOCTL_COMMON_GET_FW_VERSION_RESPONSE_PAYLOAD));
> +	printk(KERN_INFO "BladeEngine Driver version:%s. "
> +	       "Copyright ServerEngines, Corporation 2005 - 2008\n",
> +		be_drvr_ver);
> +	if (be_function_get_fw_version(&pnob->fn_obj, &ioctl_pload,
> NULL,
> +				       NULL) == BE_SUCCESS) {
> +		adapter->be_fw_ver =
> +
> simple_strtoul(ioctl_pload.firmware_version_string + 4,
> +				   NULL, 10);
> +		strncpy(be_fw_ver,
> ioctl_pload.firmware_version_string, 32);
> +		printk(KERN_INFO "BladeEngine Firmware Version:%s\n",
> +		       ioctl_pload.firmware_version_string);
> +	} else {
> +		printk(KERN_WARNING "Unable to get BE Firmware
> Version\n");
> +	}
> +
> +	sema_init(&adapter->get_eth_stat_sem, 0);
> +
> +	adapter->ctxt = (be_timer_ctxt_t *)
> +	    kmalloc(sizeof(be_timer_ctxt_t), GFP_KERNEL);
> +
> +	init_timer(&adapter->ctxt->get_stats_timer);
> +	atomic_set(&adapter->ctxt->get_stat_flag, 0);
> +	adapter->ctxt->get_stats_timer.function =
> &get_stats_timer_handler; +
> +	status = be_mcc_init(adapter);
> +	if (status < 0) {
> +		goto cleanup;
> +	}
> +
> +	be_update_link_status(adapter);
> +
> +	/* Register async call back function to handle link status
> updates */
> +	if
> (be_mcc_add_async_event_callback(&adapter->net_obj->mcc_q_obj,
> +			    be_link_status_async_callback,
> +					    (PVOID) adapter) !=
> BE_SUCCESS) {

Coding style:
val = be_mcc_add...();
if (val) {

> +		printk(KERN_WARNING "add_async_event_callback
> failed");
> +		printk(KERN_WARNING
> +		       "Link status changes may not be reflected\n");
> +	}
> +
> +	/* Enable ChipInterrupt and EQ Interrupt */
> +	bni_enable_intr(adapter->net_obj);
> +	enable_eq_intr(adapter->net_obj);
> +	adapter->dev_state = BE_DEV_STATE_INIT;
> +	return 0;		/* successful return */
> +
> +cleanup1:
> +	pci_release_regions(pdev);
> +	pci_disable_device(pdev);
> +	be_adapter[adapt_num] = NULL;
> +	kfree(adapter);
> +	goto err_ret;
> +
> +cleanup:
> +	be_remove(pdev);
> +
> +err_ret:
> +	printk(KERN_ERR "BladeEngine init failed\n");
> +	return -ENOMEM;
> +}
> +
> +/*
> + * Get the current link status and print the status on console
> + */
> +void be_update_link_status(PBE_ADAPTER adapter)
> +{
> +	int status;
> +	PBNI_NET_OBJECT pnob = adapter->net_obj;
> +
> +	status = bni_get_link_sts(pnob, adapter->be_link_sts, NULL,
> NULL); +
> +	if (status == BE_SUCCESS) {
> +		if (adapter->be_link_sts->mac0_speed &&
> +		    adapter->be_link_sts->mac0_duplex)
> +			adapter->port0_link_sts = BE_PORT_LINK_UP;
> +		else
> +			adapter->port0_link_sts = BE_PORT_LINK_DOWN;
> +
> +		if (adapter->be_link_sts->mac1_speed &&
> +		    adapter->be_link_sts->mac1_duplex)
> +			adapter->port1_link_sts = BE_PORT_LINK_UP;
> +		else
> +			adapter->port1_link_sts = BE_PORT_LINK_DOWN;
> +
> +		printk(KERN_INFO "Link Properties for %s:\n",
> +		       ((struct net_device
> *)(OSM_NOB(pnob)->os_handle))->name);
> +		be_print_link_info(adapter->be_link_sts);
> +		return;
> +	}
> +	printk(KERN_WARNING "Could not get link status for %s\n",
> +	       ((struct net_device
> *)(OSM_NOB(pnob)->os_handle))->name);
> +	return;
> +}
> +
> +/* This function handles async callback for link status */
> +void be_link_status_async_callback(PVOID context, u32 event_code,
> +				   PVOID event)
> +{
> +	ASYNC_EVENT_LINK_STATE *link_status =
> (ASYNC_EVENT_LINK_STATE *) event;
> +	PBE_ADAPTER adapter = (PBE_ADAPTER) context;
> +	BOOLEAN link_enable = FALSE;
> +	PBNI_NET_OBJECT pnob;
> +	ASYNC_EVENT_TRAILER *async_trailer;
> +	struct net_device *netdev;
> +
> +	if (event_code != ASYNC_EVENT_CODE_LINK_STATE) {
> +		/* Not our event to handle */
> +		return;
> +	}
> +	async_trailer = (ASYNC_EVENT_TRAILER *) ((u8 *) event +
> +			 sizeof(MCC_CQ_ENTRY) - sizeof
> (ASYNC_EVENT_TRAILER)); +
> +	SA_ASSERT(async_trailer->event_code ==
> ASYNC_EVENT_CODE_LINK_STATE); +
> +	pnob = adapter->net_obj;
> +	SA_ASSERT(pnob);
> +	netdev = (struct net_device *)OSM_NOB(pnob)->os_handle;
> +	SA_ASSERT(netdev);
> +
> +	/* Determine if this event is a switch VLD or a physical
> link event */
> +	if (async_trailer->event_type == NTWK_LINK_TYPE_VIRTUAL) {
> +		adapter->be_stat.bes_link_change_virtual++;
> +		if (adapter->be_link_sts->active_port !=
> +		    link_status->active_port) {
> +			printk("Active port changed due to VLD on
> switch\n");
> +		} else {
> +			/* Link of atleast one of the ports changed
> */
> +			printk("Link status update\n");
> +		}
> +
> +	} else {
> +		adapter->be_stat.bes_link_change_physical++;
> +		if (adapter->be_link_sts->active_port !=
> +				link_status->active_port) {
> +			printk("Active port changed due to port link
> status"
> +				" change\n");
> +		} else {
> +			/* Link of atleast one of the ports changed
> */
> +			printk("Link status update\n");
> +		}
> +	}
> +
> +	/* Clear memory of adapter->be_link_sts */
> +	memset(adapter->be_link_sts, 0,
> sizeof(adapter->be_link_sts)); +
> +	if ((link_status->port0_link_status == ASYNC_EVENT_LINK_UP)
> ||
> +	    (link_status->port1_link_status == ASYNC_EVENT_LINK_UP))
> {
> +		if ((adapter->port0_link_sts == BE_PORT_LINK_DOWN) &&
> +		    (adapter->port1_link_sts == BE_PORT_LINK_DOWN)) {
> +			/*
> +			 * Earlier both the ports are down
> +			 * So link is up
> +			 */
> +			link_enable = TRUE;
> +		}
> +
> +		if (link_status->port0_link_status ==
> ASYNC_EVENT_LINK_UP) {
> +			adapter->port0_link_sts = BE_PORT_LINK_UP;
> +			adapter->be_link_sts->mac0_duplex =
> +			    link_status->port0_duplex;
> +			adapter->be_link_sts->mac0_speed =
> +			    link_status->port0_speed;
> +			if (link_status->active_port == NTWK_PORT_A)
> +				adapter->be_link_sts->active_port =
> 0;
> +		} else
> +			adapter->port0_link_sts = BE_PORT_LINK_DOWN;
> +
> +		if (link_status->port1_link_status ==
> ASYNC_EVENT_LINK_UP) {
> +			adapter->port1_link_sts = BE_PORT_LINK_UP;
> +			adapter->be_link_sts->mac1_duplex =
> +			    link_status->port1_duplex;
> +			adapter->be_link_sts->mac1_speed =
> +			    link_status->port1_speed;
> +			if (link_status->active_port == NTWK_PORT_B)
> +				adapter->be_link_sts->active_port =
> 1;
> +		} else
> +			adapter->port1_link_sts = BE_PORT_LINK_DOWN;
> +
> +		printk(KERN_INFO "Link Properties for %s:\n",
> netdev->name);
> +		be_print_link_info(adapter->be_link_sts);
> +
> +		if (!link_enable)
> +			return;
> +		/*
> +		 * Both ports were down previously, but atleast one
> of
> +		 * them has come up if this netdevice's carrier is
> not up,
> +		 * then indicate to stack
> +		 */
> +		if (!netif_carrier_ok(netdev)) {
> +			netif_start_queue(netdev);
> +			netif_carrier_on(netdev);
> +		}
> +		return;
> +	}
> +
> +	/* Now both the ports are down. Tell the stack about it */
> +	printk(KERN_INFO "Both ports are down\n");
> +
> +	adapter->port0_link_sts = BE_PORT_LINK_DOWN;
> +	adapter->port1_link_sts = BE_PORT_LINK_DOWN;
> +
> +	/* if this netdevice's carrier is not down, then indicate to
> stack */
> +	if (netif_carrier_ok(netdev)) {
> +		netif_carrier_off(netdev);
> +		netif_stop_queue(netdev);
> +	}
> +	return;
> +}
> +
> +/* Function to initialize MCC rings */
> +int be_mcc_init(PBE_ADAPTER adapter)
> +{
> +	u32 n, r, m;
> +	PBNI_NET_OBJECT pnob;
> +
> +	pnob = adapter->net_obj;
> +	if (!pm_resume) {
> +		be_init_procfs(adapter);
> +		/*
> +		 * Create the MCC ring so that all further
> communication with
> +		 * MCC can go thru the ring. we do this at the end
> since
> +		 * we do not want to be dealing with interrupts
> until the
> +		 * initialization is complete.
> +		 */
> +		pnob->mcc_q_len = MCC_Q_LEN;
> +		n = pnob->mcc_q_len * sizeof(MCC_WRB);
> +		n = MAX(n, PAGE_SIZE);
> +		/* Get number of pages */
> +		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
> +		pnob->mcc_q =
> +		    (PMCC_WRB) __get_free_pages(GFP_KERNEL,
> sa_log2(m));
> +		if (pnob->mcc_q == NULL)
> +			goto cleanup;
> +		pnob->mcc_q_pages = m;
> +		pnob->mcc_q_pa = virt_to_phys(pnob->mcc_q);
> +		pnob->mcc_q_pa = cpu_to_le64(pnob->mcc_q_pa);
> +		/*
> +		 * space for MCC WRB context
> +		 */
> +		pnob->mcc_wrb_ctxtLen = MCC_Q_LEN;
> +		n = pnob->mcc_wrb_ctxtLen *
> sizeof(BE_MCC_WRB_CONTEXT);
> +		n = MAX(n, PAGE_SIZE);	/* Need to allocate
> alteast one page */
> +		/* Get number of pages */
> +		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
> +		pnob->mcc_wrb_ctxt =
> +		    (PVOID) __get_free_pages(GFP_KERNEL, sa_log2(m));
> +		if (pnob->mcc_wrb_ctxt == NULL)
> +			goto cleanup;
> +		pnob->mcc_wrb_ctxt_pages = m;
> +		/*
> +		 * Space for MCC compl. ring
> +		 */
> +		pnob->mcc_cq_len = MCC_CQ_LEN;
> +		n = pnob->mcc_cq_len * sizeof(MCC_CQ_ENTRY);
> +		n = MAX(n, PAGE_SIZE);	/* Need to allocate
> alteast one page */
> +		/* Get number of pages */
> +		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
> +		pnob->mcc_cq =
> +		    (PMCC_CQ_ENTRY) __get_free_pages(GFP_KERNEL,
> +						     sa_log2(m));
> +		if (pnob->mcc_cq == NULL)
> +			goto cleanup;
> +		pnob->mcc_cq_pa = virt_to_phys(pnob->mcc_cq);
> +		pnob->mcc_cq_pa = cpu_to_le64(pnob->mcc_cq_pa);
> +		pnob->mcc_cq_pages = m;
> +
> +	}
> +	memset(pnob->mcc_q, 0, pnob->mcc_q_pages * PAGE_SIZE);
> +	pnob->mcc_q_hd = 0;
> +
> +	memset(pnob->mcc_wrb_ctxt, 0,
> +	       pnob->mcc_wrb_ctxt_pages * PAGE_SIZE);
> +
> +	memset(pnob->mcc_cq, 0, pnob->mcc_cq_pages * PAGE_SIZE);
> +	pnob->mcc_cq_tl = 0;
> +
> +	r = bni_create_mcc_rings(adapter->net_obj);
> +	if (r != BE_SUCCESS)
> +		goto cleanup;
> +
> +	return 0;
> +cleanup:
> +	TRACE(DL_INIT, "Failed to create MCC rings\n");
> +	return -ENOMEM;
> +
> +}
> +
> +static void be_remove(struct pci_dev *pdev)
> +{
> +	PBNI_NET_OBJECT pnob = NULL;
> +	PBE_ADAPTER adapter = NULL;
> +	int adapt_num = 0;
> +	int i;
> +
> +	while (adapt_num < MAX_BE_DEVICES) {
> +		if ((be_adapter[adapt_num]) &&
> +		    (be_adapter[adapt_num]->pdev == pdev)) {
> +			adapter = be_adapter[adapt_num];
> +			pnob = (BNI_NET_OBJECT *) adapter->net_obj;
> +			break;
> +		}
> +		adapt_num++;
> +	}
> +
> +	SA_ASSERT(adapter);
> +
> +	flush_scheduled_work();
> +
> +	/* Unregister async call back function for link status
> updates */
> +	if (be_mcc_add_async_event_callback(&pnob->mcc_q_obj,
> +					    NULL, NULL) !=
> BE_SUCCESS)
> +		printk(KERN_WARNING "Unregister async callback for
> link "
> +		       "status updates failed.\n");
> +
> +	cleanup_netobject(adapter->net_obj);
> +
> +	be_cleanup_procfs(adapter);
> +
> +	bni_cleanup(&adapter->chip_object);
> +
> +	for (i = 0; i < adapter->num_bars; i++) {
> +		if (adapter->pci_bars[i].base_va) {
> +			iounmap(adapter->pci_bars[i].base_va);
> +		}
> +	}
> +
> +	pci_release_regions(adapter->pdev);
> +	pci_disable_device(adapter->pdev);
> +
> +	/* Free Link status structure */
> +	if (adapter->be_link_sts) {
> +		kfree(adapter->be_link_sts);
> +	}
> +
> +	if (adapter->eth_statsp) {
> +		kfree(adapter->eth_statsp);
> +	}
> +
> +	del_timer_sync(&adapter->ctxt->get_stats_timer);
> +
> +	if (adapter->ctxt) {
> +		kfree(adapter->ctxt);
> +	}
> +
> +	be_adapter[adapt_num] = NULL;
> +	kfree(adapter);
> +}
> +
> +static int be_suspend(struct pci_dev *pdev, pm_message_t state)
> +{
> +#ifdef CONFIG_PM
> +	struct net_device *netdev = NULL;
> +	PBNI_NET_OBJECT pnob = NULL;
> +	PBE_ADAPTER adapter = NULL;
> +
> +	int adapt_num = 0;
> +	while (adapt_num < MAX_BE_DEVICES) {
> +		if (be_adapter[adapt_num] &&
> +		    (be_adapter[adapt_num]->pdev == pdev)) {
> +			adapter = be_adapter[adapt_num];
> +			pnob = (BNI_NET_OBJECT *)
> adapter->netdevp->priv;
> +			netdev = adapter->netdevp;
> +			netif_device_detach(netdev);
> +			break;
> +		}
> +		adapt_num++;
> +	}
> +	SA_ASSERT(adapter);
> +
> +	netif_device_detach(netdev);
> +	if (netif_running(netdev))
> +		be_pm_cleanup(adapter, pnob, netdev);
> +
> +	pci_enable_wake(pdev, 3, 1);
> +	pci_enable_wake(pdev, 4, 1);	/* D3 Cold = 4 */
> +	pci_save_state(pdev);
> +	pci_disable_device(pdev);
> +	pci_set_power_state(pdev, pci_choose_state(pdev, state));
> +#endif
> +	return 0;
> +}
> +
> +static int be_resume(struct pci_dev *pdev)
> +{
> +#ifdef CONFIG_PM
> +	int status = 0;
> +	struct net_device *netdev = NULL;
> +	PBNI_NET_OBJECT pnob = NULL;
> +	PBE_ADAPTER adapter = NULL;
> +	u32 adapt_num = 0;
> +
> +	pm_resume = 1;
> +	while (adapt_num < MAX_BE_DEVICES) {
> +		if (be_adapter[adapt_num] &&
> +			    (be_adapter[adapt_num]->pdev == pdev)) {
> +			adapter = be_adapter[adapt_num];
> +			pnob = (BNI_NET_OBJECT *)
> adapter->netdevp->priv;
> +			netdev = adapter->netdevp;
> +			netif_device_detach(netdev);
> +			break;
> +		}
> +		adapt_num++;
> +	}
> +	SA_ASSERT(adapter);
> +
> +	status = pci_enable_device(pdev);
> +	if (status)
> +		return status;
> +
> +	pci_set_power_state(pdev, 0);
> +	pci_restore_state(pdev);
> +	pci_enable_wake(pdev, 3, 0);
> +	pci_enable_wake(pdev, 4, 0);	/* 4 is D3 cold */
> +
> +	netif_carrier_on(netdev);
> +	netif_start_queue(netdev);
> +
> +	if (netif_running(netdev)) {
> +		status = be_prepare_interface(adapter);
> +
> +		if (status < 0) {
> +			return (status);
> +		}
> +		status = be_mcc_init(adapter);
> +		if (status < 0) {
> +			printk(KERN_ERR "be_mcc_init failed\n");
> +			return (status);
> +		}
> +		be_update_link_status(adapter);
> +		/*
> +		 * Register async call back function to handle link
> +		 * status updates
> +		 */
> +		if (be_mcc_add_async_event_callback(
> +			&adapter->net_obj->mcc_q_obj,
> +			be_link_status_async_callback,
> +					    (PVOID) adapter) !=
> BE_SUCCESS) {
> +			printk(KERN_WARNING
> "add_async_event_callback failed");
> +			printk(KERN_WARNING
> +			       "Link status changes may not be
> reflected\n");
> +		}

val = be_mcc...()
if (val) {

> +		bni_enable_intr(pnob);
> +		enable_eq_intr(pnob);
> +		be_up(adapter);
> +	}
> +	netif_device_attach(netdev);
> +	pm_resume = 0;
> +#endif
> +	return 0;
> +
> +}
> +
> +#ifdef CONFIG_PM
> +static void be_pm_cleanup(PBE_ADAPTER adapter,
> +			  PBNI_NET_OBJECT pnob, struct net_device
> *netdev) +{
> +	u32 i;
> +
> +	netif_carrier_off(netdev);
> +	netif_stop_queue(netdev);
> +
> +	wait_nic_tx_cmpl(pnob);
> +	disable_eq_intr(pnob);
> +	if (adapter->tasklet_started) {
> +		tasklet_kill(&(adapter->sts_handler));
> +		adapter->isr_registered = 0;
> +	}
> +	if (adapter->isr_registered) {
> +		free_irq(netdev->irq, netdev);
> +		adapter->tasklet_started = 0;
> +	}
> +	/* Disable chip interrupt */
> +	bni_disable_intr(pnob);
> +	bni_destroy_netobj(pnob, &adapter->sa_device);
> +
> +	if (pnob->rx_ctxt) {
> +		BE_RX_PAGE_INFO *rx_page_info;
> +
> +		/*
> +		 * go through RX context array and free
> +		 * data buffs
> +		 */
> +		for (i = 0; i < pnob->rx_q_len; i++) {
> +			rx_page_info =
> &(OSM_NOB(pnob)->rx_page_info[i]);
> +			if ((OSM_NOB(pnob)->rx_pg_shared == FALSE) ||
> +
> (rx_page_info->page_offset))
> +				pci_unmap_page(adapter->pdev,
> +
> pci_unmap_addr(rx_page_info,
> +							      bus),
> +					       pnob->rx_buf_size,
> +					       PCI_DMA_FROMDEVICE);
> +			if (rx_page_info->page)
> +				put_page(rx_page_info->page);
> +			memset(rx_page_info, 0,
> sizeof(BE_RX_PAGE_INFO));
> +		}
> +		OSM_NOB(pnob)->rx_pg_info_hd = 0;
> +	}
> +
> +}
> +
> +static void be_up(PBE_ADAPTER adapter)
> +{
> +	PBNI_NET_OBJECT pnob = adapter->net_obj;
> +
> +	if (OSM_NOB(pnob)->num_vlans != 0)
> +		bni_config_vlan(pnob, OSM_NOB(pnob)->vlan_tag,
> +				OSM_NOB(pnob)->num_vlans, NULL,
> NULL, 0); +
> +}
> +#endif
> +
> +static int be_setup_tx_res(PBNI_NET_OBJECT NetObject)
> +{
> +	int n;
> +
> +	n = NetObject->tx_q_len * sizeof(PVOID *);
> +	if (!pm_resume) {
> +		NetObject->tx_ctxt = (PVOID *) kmalloc(n,
> GFP_KERNEL); +
> +		if (NetObject->tx_ctxt == NULL) {
> +			TRACE(DL_INIT,
> +			      "Failed to alloc memory for
> tx_ctxt\n");
> +			return -1;
> +		}
> +	}
> +	memset(NetObject->tx_ctxt, 0, n);
> +	return 0;
> +}
> +
> +static int be_setup_rx_res(PBNI_NET_OBJECT NetObject)
> +{
> +	int n;
> +
> +	if (!pm_resume) {
> +		n = (NetObject->rx_q_len * sizeof(PVOID));
> +		NetObject->rx_ctxt = kmalloc(n, GFP_KERNEL);
> +		if (NetObject->rx_ctxt == NULL) {
> +			TRACE(DL_INIT, "Failed to alloc memory for
> rx_ctxt\n");
> +			return -1;
> +		}
> +
> +		n = (NetObject->rx_q_len * sizeof(BE_RX_PAGE_INFO));
> +		OSM_NOB(NetObject)->rx_page_info = kmalloc(n,
> GFP_KERNEL);
> +		if (OSM_NOB(NetObject)->rx_page_info == NULL) {
> +			TRACE(DL_INIT,
> +			      "Failed to alloc memory for receive
> page info\n");
> +			kfree(NetObject->rx_ctxt);
> +			return -1;
> +		}
> +	}
> +
> +	memset(NetObject->rx_ctxt, 0, NetObject->rx_q_len *
> sizeof(PVOID));
> +	memset(OSM_NOB(NetObject)->rx_page_info, 0,
> +	       NetObject->rx_q_len * sizeof(BE_RX_PAGE_INFO));
> +	OSM_NOB(NetObject)->rx_pg_info_hd = 0;
> +	NetObject->rx_q_hd = 0;
> +	NetObject->rx_q_posted = 0;
> +	/* post  ETH RX buffers */
> +	post_eth_rx_buffs(NetObject);
> +
> +	return 0;
> +}
> +
> +/*
> + * free all resources associated with a NetObject
> + * Called at the time of module cleanup as well a any error during
> + * module init.  Some resources may be partially allocated in a
> NetObj.
> + */
> +void cleanup_netobject(PBNI_NET_OBJECT pnob)
> +{
> +	struct net_device *netdev;
> +	PBE_ADAPTER adapter;
> +	struct sk_buff *skb;
> +	int i;
> +
> +	SA_ASSERT(pnob);
> +	netdev = (struct net_device *)OSM_NOB(pnob)->os_handle;
> +	SA_ASSERT(netdev);
> +	adapter = (PBE_ADAPTER) OSM_NOB(pnob)->adapter;
> +	SA_ASSERT(adapter);
> +
> +	/* Only if this netdev is up */
> +	if (netif_running(netdev)) {
> +		/*
> +		 * Let us stop the dev queue for the
> +		 * interface associated with this netobj.
> +		 */
> +		netif_stop_queue(netdev);
> +
> +		/* Wait until no more pending transmits  */
> +		wait_nic_tx_cmpl(pnob);
> +
> +		/* Disable this EQ's interrupt  */
> +		disable_eq_intr(pnob);
> +	}
> +
> +	if ((adapter->isr_registered) & (adapter->msix_enabled))
> +		free_irq(adapter->msix_entries[0].vector, netdev);
> +	else if ((adapter->isr_registered)
> & !(adapter->msix_enabled))
> +		free_irq(netdev->irq, netdev);
> +
> +	adapter->isr_registered = 0;
> +	if (adapter->msix_enabled) {
> +		pci_disable_msix(adapter->pdev);
> +		adapter->msix_enabled = 0;
> +	}
> +	if (adapter->tasklet_started) {
> +		tasklet_kill(&(adapter->sts_handler));
> +		adapter->tasklet_started = 0;
> +	}
> +	/* Disable chip interrupt */
> +	bni_disable_intr(pnob);
> +
> +	unregister_netdev(netdev);
> +	/* memory associted with netdev is freed by OS  */
> +
> +	/* Destroy Net Object */
> +	bni_destroy_netobj(pnob, &adapter->sa_device);
> +
> +	adapter->net_obj = NULL;
> +	adapter->netdevp = NULL;
> +
> +	/* free all the memory allocated for the queues */
> +
> +	if (pnob->mcc_q) {
> +		free_pages((unsigned long)pnob->mcc_q,
> +			   sa_log2(pnob->mcc_q_pages));
> +	}
> +
> +	if (pnob->mcc_wrb_ctxt) {
> +		free_pages((unsigned long)pnob->mcc_wrb_ctxt,
> +			   sa_log2(pnob->mcc_wrb_ctxt_pages));
> +	}
> +
> +	if (pnob->mcc_cq) {
> +		free_pages((unsigned long)pnob->mcc_cq,
> +			   sa_log2(pnob->mcc_cq_pages));
> +	}
> +
> +	if (pnob->event_q) {
> +		free_pages((unsigned long)pnob->event_q,
> +			   sa_log2(pnob->event_q_pages));
> +	}
> +
> +	if (pnob->tx_cq) {
> +		free_pages((unsigned long)pnob->tx_cq,
> +			   sa_log2(pnob->tx_cq_pages));
> +	}
> +
> +	if (pnob->tx_q) {
> +		free_pages((unsigned long)pnob->tx_q,
> +			   sa_log2(pnob->tx_q_pages));
> +	}
> +
> +	if (pnob->bcrx_cq) {
> +		free_pages((unsigned long)pnob->bcrx_cq,
> +			   sa_log2(pnob->bcrx_cq_pages));
> +	}
> +
> +	if (pnob->rx_q) {
> +		free_pages((unsigned long)pnob->rx_q,
> +			   sa_log2(pnob->rx_q_pages));
> +	}
> +
> +	if (pnob->ucrx_cq) {
> +		free_pages((unsigned long)pnob->ucrx_cq,
> +			   sa_log2(pnob->ucrx_cq_pages));
> +	}
> +
> +	/* free all allocated memory stored in the net object */
> +	if (pnob->rx_ctxt) {
> +		BE_RX_PAGE_INFO *rx_page_info;
> +		/*
> +		 * go through RX context array and free data buffs
> +		 */
> +		for (i = 0; i < pnob->rx_q_len; i++) {
> +			rx_page_info =
> &(OSM_NOB(pnob)->rx_page_info[i]);
> +			if ((OSM_NOB(pnob)->rx_pg_shared == FALSE) ||
> +
> (rx_page_info->page_offset)) {
> +				pci_unmap_page(adapter->pdev,
> +					pci_unmap_addr(rx_page_info,
> bus),
> +					pnob->rx_buf_size,
> PCI_DMA_FROMDEVICE);
> +			}
> +			if (rx_page_info->page) {
> +				put_page(rx_page_info->page);
> +			}
> +			memset(rx_page_info, 0,
> sizeof(BE_RX_PAGE_INFO));
> +		}
> +		OSM_NOB(pnob)->rx_pg_info_hd = 0;
> +		kfree(OSM_NOB(pnob)->rx_page_info);
> +		kfree(pnob->rx_ctxt);
> +	}
> +
> +	if (pnob->tx_ctxt) {
> +		for (i = 0; i < pnob->tx_q_len; i++) {
> +			skb = (struct sk_buff *)pnob->tx_ctxt[i];
> +			if (skb) {
> +				kfree_skb(skb);
> +			}
> +		}
> +		kfree(pnob->tx_ctxt);
> +	}
> +
> +	if (pnob->mb_ptr) {
> +		kfree(pnob->mb_ptr);
> +	}
> +
> +	if (OSM_NOB(pnob)) {
> +		kfree(OSM_NOB(pnob));
> +	}
> +
> +	/* finally,  free the net object itself */
> +	kfree(pnob);
> +
> +}
> +
> +/*
> + * this function creates a NetObject with a set of Eth rings.
> + */
> +int be_prepare_interface(PBE_ADAPTER adapter)
> +{
> +	struct net_device *netdev = NULL;
> +	PBNI_NET_OBJECT pnob = NULL;
> +	SA_DEV_BAR_LOCATIONS pci_bars[3];
> +	int status;
> +	u32 n, m;
> +	PVOID p;
> +
> +	if (!pm_resume) {
> +		/*Normal Mode */
> +		memcpy(pci_bars, adapter->pci_bars,
> +		       sizeof(adapter->pci_bars));
> +
> +		pnob = (PBNI_NET_OBJECT)
> +		    kmalloc(sizeof(BNI_NET_OBJECT), GFP_KERNEL);
> +
> +		if (pnob == NULL) {
> +			TRACE(DL_INIT,
> +			      "Failed to alloc memory for
> NetObject\n");
> +			goto err_ret1;
> +		}
> +		memset(pnob, 0, sizeof(BNI_NET_OBJECT));
> +		TRACE(DL_INIT, "Done with net obj alloc\n");
> +
> +		pnob->osm_netobj = (linux_net_object_t *)
> +		    kmalloc(sizeof(linux_net_object_t), GFP_KERNEL);
> +		if (pnob->osm_netobj == NULL) {
> +			TRACE(DL_INIT,
> +			      "Failed to alloc memory OSM
> NetObject\n");
> +			kfree(pnob);
> +			goto err_ret1;
> +		}
> +		memset(pnob->osm_netobj, 0,
> sizeof(linux_net_object_t)); +
> +		OSM_NOB(pnob)->devno = 0;
> +		OSM_NOB(pnob)->adapter = adapter;
> +
> +		/* Mail box sgl */
> +		pnob->mb_sgl.length = sizeof(MCC_MAILBOX);
> +		p = kmalloc(pnob->mb_sgl.length + 16, GFP_KERNEL);
> +		if (p == NULL) {
> +			TRACE(DL_INIT,
> +			      "Failed to alloc mem for
> MCC_MAILBOX\n");
> +			goto err_ret1;
> +		}
> +		/* Mailbox pointer needs to be 16 byte aligned */
> +		pnob->mb_ptr = p;
> +		p = (PVOID) ((unsigned long)(p + 15) & ~0xf);
> +		pnob->mb_sgl.va = (void *)p;
> +		pnob->mb_sgl.pa = virt_to_phys(p);
> +		pnob->mb_sgl.pa = cpu_to_le64(pnob->mb_sgl.pa);
> +		/*
> +		 * Event queue
> +		 */
> +		pnob->event_q_len = EVENT_Q_LEN;
> +		n = pnob->event_q_len * sizeof(EQ_ENTRY);
> +		n = MAX(n, (2 * PAGE_SIZE));
> +		/* Get number of pages */
> +		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
> +		pnob->event_q = (PEQ_ENTRY)
> +		    __get_free_pages(GFP_KERNEL, sa_log2(m));
> +		if (pnob->event_q == NULL)
> +			goto err_ret1;
> +		pnob->event_q_pa = virt_to_phys(pnob->event_q);
> +		pnob->event_q_pa = cpu_to_le64(pnob->event_q_pa);
> +		pnob->event_q_pages = m;
> +		/*
> +		 * Eth TX queue
> +		 */
> +		pnob->tx_q_len = ETH_TXQ_LEN;
> +		pnob->tx_q_port = 0;	/* No port binding */
> +		n = pnob->tx_q_len * sizeof(ETH_WRB);
> +		n = MAX(n, PAGE_SIZE);	/* Need to allocate
> alteast one page */
> +		/* Get number of pages */
> +		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
> +		pnob->tx_q = (PETH_WRB)
> +		    __get_free_pages(GFP_KERNEL, sa_log2(m));
> +		if (pnob->tx_q == NULL)
> +			goto err_ret1;
> +		pnob->tx_q_pa = virt_to_phys(pnob->tx_q);
> +		pnob->tx_q_pa = cpu_to_le64(pnob->tx_q_pa);
> +		pnob->tx_q_pages = m;
> +		/*
> +		 * Eth TX Compl queue
> +		 */
> +		pnob->txcq_len = ETH_TXCQ_LEN;
> +		n = pnob->txcq_len * sizeof(ETH_TX_COMPL);
> +		n = MAX(n, PAGE_SIZE);	/* Need to allocate
> alteast one page */
> +		/* Get number of pages */
> +		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
> +		pnob->tx_cq = (PETH_TX_COMPL)
> +		    __get_free_pages(GFP_KERNEL, sa_log2(m));
> +		if (pnob->tx_cq == NULL)
> +			goto err_ret1;
> +		pnob->tx_cq_pa = virt_to_phys(pnob->tx_cq);
> +		pnob->tx_cq_pa = cpu_to_le64(pnob->tx_cq_pa);
> +		pnob->tx_cq_pages = m;
> +		/*
> +		 * Eth RX queue
> +		 */
> +		pnob->rx_q_len = ETH_RXQ_LEN;
> +		n = pnob->rx_q_len * sizeof(ETH_RX_D);
> +		n = MAX(n, PAGE_SIZE);	/* Need to allocate
> alteast one page */
> +		/* Get number of pages */
> +		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
> +		pnob->rx_q = (PETH_RX_D)
> +		    __get_free_pages(GFP_KERNEL, sa_log2(m));
> +		if (pnob->rx_q == NULL)
> +			goto err_ret1;
> +		pnob->rx_q_pa = virt_to_phys(pnob->rx_q);
> +		pnob->rx_q_pa = cpu_to_le64(pnob->rx_q_pa);
> +		pnob->rx_q_pages = m;
> +		/*
> +		 * Eth Unicast RX Compl queue
> +		 */
> +		pnob->ucrx_cq_len = ETH_UC_RXCQ_LEN;
> +		n = pnob->ucrx_cq_len * sizeof(ETH_RX_COMPL);
> +		n = MAX(n, PAGE_SIZE);	/* Need to allocate
> alteast one page */
> +		/* Get number of pages */
> +		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
> +		pnob->ucrx_cq = (PETH_RX_COMPL)
> +		    __get_free_pages(GFP_KERNEL, sa_log2(m));
> +		if (pnob->ucrx_cq == NULL)
> +			goto err_ret1;
> +		pnob->ucrx_cq_pa = virt_to_phys(pnob->ucrx_cq);
> +		pnob->ucrx_cq_pa = cpu_to_le64(pnob->ucrx_cq_pa);
> +		pnob->ucrx_cq_pages = m;
> +		/*
> +		 * Eth Broadcast RX Compl queue
> +		 */
> +		pnob->bcrx_cq_len = ETH_BC_RXCQ_LEN;
> +		n = pnob->bcrx_cq_len * sizeof(ETH_RX_COMPL);
> +		n = MAX(n, PAGE_SIZE);
> +		/* Get number of pages */
> +		m = (n + (PAGE_SIZE - 1)) / (PAGE_SIZE);
> +		pnob->bcrx_cq = (PETH_RX_COMPL)
> +		    __get_free_pages(GFP_KERNEL, sa_log2(m));
> +		if (pnob->bcrx_cq == NULL)
> +			goto err_ret1;
> +		pnob->bcrx_cq_pa = virt_to_phys(pnob->bcrx_cq);
> +		pnob->bcrx_cq_pa = cpu_to_le64(pnob->bcrx_cq_pa);
> +		pnob->bcrx_cq_pages = m;
> +
> +		/* Allocate DMA'ble Memory for
> IOCTL_ETH_GET_STATISTICS */
> +		adapter->eth_statsp = (IOCTL_ETH_GET_STATISTICS *)
> +		    kmalloc(sizeof(IOCTL_ETH_GET_STATISTICS),
> GFP_KERNEL);
> +		if (adapter->eth_statsp == NULL) {
> +			TRACE(DL_INIT,
> +			      "Failed to alloc memory for Eth
> stats\n");
> +			goto err_ret1;
> +		}
> +		pnob->rx_buf_size = rxbuf_size;
> +		/*
> +		 * Set dev close to be TRUE. This will be enabled on
> dev open
> +		 */
> +		adapter->dev_state = BE_DEV_STATE_NONE;
> +	} else {
> +		pnob = adapter->net_obj;
> +		memcpy(pci_bars, adapter->pci_bars,
> +		       sizeof(adapter->pci_bars));
> +	}
> +
> +	memset(pnob->event_q, 0, pnob->event_q_pages * PAGE_SIZE);
> +	pnob->event_q_tl = 0;
> +
> +	memset(pnob->tx_q, 0, pnob->tx_q_pages * PAGE_SIZE);
> +	pnob->tx_q_hd = 0;
> +	pnob->tx_q_tl = 0;
> +
> +	memset(pnob->tx_cq, 0, pnob->tx_cq_pages * PAGE_SIZE);
> +	pnob->tx_cq_tl = 0;
> +
> +	memset(pnob->rx_q, 0, pnob->rx_q_pages * PAGE_SIZE);
> +
> +	memset(pnob->ucrx_cq, 0, pnob->ucrx_cq_pages * PAGE_SIZE);
> +	pnob->ucrx_cq_tl = 0;
> +
> +	memset(pnob->bcrx_cq, 0, pnob->bcrx_cq_pages * PAGE_SIZE);
> +	pnob->bcrx_cq_tl = 0;
> +	n = bni_create_netobj(pnob, pci_bars, adapter->num_bars,
> +				   &adapter->sa_device,
> +				   &adapter->chip_object);
> +	if (n != BE_SUCCESS) {
> +		TRACE(DL_ERROR, "bni_create_netobj failed - returned
> %x", n);
> +		goto err_ret1;
> +	}
> +	TRACE(DL_INIT, "Creation of NetObject Done");
> +
> +	status = init_be_netdev(adapter, pnob);
> +	if (status < 0)
> +		goto err_ret;
> +	netdev = OSM_NOB(pnob)->os_handle;
> +
> +#ifdef CONFIG_BENET_NAPI
> +	netif_napi_add(netdev, &OSM_NOB(pnob)->napi, be_poll, 64);
> +	OSM_NOB(pnob)->rx_sched = FALSE;
> +	spin_lock_init(&OSM_NOB(pnob)->rx_lock);
> +#endif
> +
> +	if (be_setup_tx_res(pnob))
> +		goto err_ret;
> +	if (be_setup_rx_res(pnob))
> +		goto err_ret;
> +
> +	if (!pm_resume) {
> +		adapter->netdevp = OSM_NOB(pnob)->os_handle;
> +		adapter->net_obj = pnob;
> +	}
> +	return 0;
> +
> +err_ret:
> +	cleanup_netobject(pnob);
> +
> +err_ret1:
> +	printk(KERN_ERR "Interface initialization failed\n");
> +	return -1;
> +}
> +
> +void enable_eq_intr(PBNI_NET_OBJECT pnob)
> +{
> +	bni_enable_eq_intr(pnob);
> +}
> +
> +void disable_eq_intr(PBNI_NET_OBJECT pnob)
> +{
> +	bni_disable_eq_intr(pnob);
> +}
> +
> +/* Wait until no more pending transmits  */
> +void wait_nic_tx_cmpl(PBNI_NET_OBJECT pnob)
> +{
> +	int i;
> +
> +	/* Wait for 20us * 50000 (= 1s) and no more */
> +	i = 0;
> +	while ((pnob->tx_q_tl != pnob->tx_q_hd) && (i < 50000)) {
> +		++i;
> +		udelay(20);
> +	}
> +
> +	/* Check for no more pending transmits */
> +	if (i >= 50000) {
> +		printk(KERN_WARNING
> +		       "Did not receive completions for all TX
> requests\n");
> +	}
> +}
> diff -uprN orig/linux-2.6.24.2/drivers/net/benet/be_netif.c
> benet/linux-2.6.24.2/drivers/net/benet/be_netif.c ---
> orig/linux-2.6.24.2/drivers/net/benet/be_netif.c	1970-01-01
> 05:30:00.000000000 +0530 +++
> benet/linux-2.6.24.2/drivers/net/benet/be_netif.c	2008-02-14
> 15:31:33.420341008 +0530 @@ -0,0 +1,600 @@ +/*
> + * Copyright (C) 2005 - 2008 ServerEngines
> + * All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version 2
> + * of the License, or at your option any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> + * See the GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, 5th Floor
> + * Boston, MA 02110-1301 USA
> + *
> + *
> + * The full GNU General Public License is included in this
> distribution
> + * in the file called GPL.
> + *
> + * Contact Information:
> + * linux-drivers@serverengines.com
> + *
> + * ServerEngines
> + * 209 N. Fair Oaks Ave
> + * Sunnyvale, CA 94085
> + *
> + */
> +/*
> + * be_netif.c
> + *
> + * This file contains various entry points of drivers seen by tcp/ip
> stack.
> + */
> +
> +#include <linux/pci.h>
> +#include "be.h"
> +#include <linux/ip.h>
> +
> +extern unsigned int ls_mss;
> +
> +unsigned int pm_resume;
> +
> +/* Strings to print Link properties */
> +char *link_speed[] = {
> +	"Invalid link Speed Value",
> +	"10 Mbps",
> +	"100 Mbps",
> +	"1 Gbps",
> +	"10 Gbps"
> +};
> +
> +char *link_duplex[] = {
> +	"Invalid Duplex Value",
> +	"Half Duplex",
> +	"Full Duplex"
> +};
> +
> +#ifdef BE_POLL_MODE
> +struct net_device *irq_netdev;
> +#endif
> +
> +int benet_xmit(struct sk_buff *skb, struct net_device *netdev);
> +int benet_set_mac_addr(struct net_device *netdev, void *p);
> +
> +void be_print_link_info(PBE_LINK_STATUS lnk_status)
> +{
> +	printk("PortNo 0:");
> +	if (lnk_status->mac0_speed && lnk_status->mac0_duplex) {
> +		/* Port is up and running */
> +		if (lnk_status->mac0_speed < 5)
> +			printk(" Link Speed: %s,",
> +			       link_speed[lnk_status->mac0_speed]);
> +		else
> +			printk(" %s,", link_speed[0]);
> +
> +		if (lnk_status->mac0_duplex < 3)
> +			printk(" %s",
> +			       link_duplex[lnk_status->mac0_duplex]);
> +		else
> +			printk(" %s", link_duplex[0]);
> +
> +		if (lnk_status->active_port == 0)
> +			printk("(active)\n");
> +		else
> +			printk("\n");
> +	} else
> +		printk(" Down \n");
> +
> +	printk("PortNo 1:");
> +	if (lnk_status->mac1_speed && lnk_status->mac1_duplex) {
> +		/* Port is up and running */
> +		if (lnk_status->mac1_speed < 5)
> +			printk(" Link Speed: %s,",
> +			       link_speed[lnk_status->mac1_speed]);
> +		else
> +			printk(" %s,", link_speed[0]);
> +
> +		if (lnk_status->mac1_duplex < 3)
> +			printk(" %s",
> +			       link_duplex[lnk_status->mac1_duplex]);
> +		else
> +			printk(" %s", link_duplex[0]);
> +
> +		if (lnk_status->active_port == 1)
> +			printk("(active)\n");
> +		else
> +			printk("\n");
> +	} else
> +		printk(" Down \n");
> +
> +	return;
> +}
> +
> +int benet_open(struct net_device *netdev)
> +{
> +	PBNI_NET_OBJECT pnob = (BNI_NET_OBJECT *) netdev->priv;
> +	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
> +
> +	TRACE(DL_INIT, "entered-benet_open()");
> +
> +	if (adapter->dev_state < BE_DEV_STATE_INIT)
> +		return -EAGAIN;
> +
> +	be_update_link_status(adapter);
> +
> +	/*
> +	 * Set carrier on only if Physical Link up
> +	 * Either of the port link status up signifies this
> +	 */
> +	if ((adapter->port0_link_sts == BE_PORT_LINK_UP) ||
> +	    (adapter->port1_link_sts == BE_PORT_LINK_UP)) {
> +		netif_start_queue(netdev);
> +		netif_carrier_on(netdev);
> +	}
> +
> +	enable_eq_intr(pnob);
> +	adapter->dev_state = BE_DEV_STATE_OPEN;
> +
> +#ifdef CONFIG_BENET_NAPI
> +	napi_enable(&OSM_NOB(pnob)->napi);
> +#endif
> +	return 0;
> +}
> +
> +int benet_close(struct net_device *netdev)
> +{
> +	PBNI_NET_OBJECT pnob = (BNI_NET_OBJECT *) netdev->priv;
> +	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
> +
> +	/* Stop Transmitting */
> +	netif_stop_queue(netdev);
> +
> +	synchronize_irq(netdev->irq);
> +
> +	/* Wait until no more pending transmits  */
> +	wait_nic_tx_cmpl(pnob);
> +
> +	adapter->dev_state = BE_DEV_STATE_INIT;
> +
> +	netif_carrier_off(netdev);
> +
> +	adapter->port0_link_sts = BE_PORT_LINK_DOWN;
> +	adapter->port1_link_sts = BE_PORT_LINK_DOWN;
> +
> +#ifdef CONFIG_BENET_NAPI
> +	napi_disable(&OSM_NOB(pnob)->napi);
> +#endif
> +	return 0;
> +}
> +
> +int benet_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
> +{
> +	TRACE(DL_INIT, "entered benet_ioctl()");
> +
> +	switch (cmd) {
> +	case SIOCETHTOOL:
> +		return be_ethtool_ioctl(dev, ifr);
> +	default:
> +		return -EOPNOTSUPP;
> +	}
> +}
> +
> +/*
> + * Setting a Mac Address for BE
> + * Takes netdev and a void pointer as arguments.
> + * The pointer holds the new addres to be used.
> + */
> +int benet_set_mac_addr(struct net_device *netdev, void *p)
> +{
> +	struct sockaddr *addr = p;
> +	PBNI_NET_OBJECT pnob;
> +	SA_MAC_ADDRESS mac_addr;
> +
> +	SA_ASSERT(netdev);
> +	pnob = (PBNI_NET_OBJECT) netdev->priv;
> +	SA_ASSERT(pnob);
> +
> +	memcpy(pnob->mac_address, addr->sa_data, netdev->addr_len);
> +	memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
> +	memcpy(mac_addr.bytes, pnob->mac_address,
> SA_MAC_ADDRESS_SIZE);
> +	bni_set_uc_mac_adr(pnob, 0, 0, OSM_NOB(pnob)->devno,
> +			   &mac_addr, NULL, NULL);
> +	/*
> +	 * Since we are doing Active-Passive failover, both
> +	 * ports should have matching MAC addresses everytime.
> +	 */
> +	bni_set_uc_mac_adr(pnob, 1, 0, OSM_NOB(pnob)->devno,
> +			   &mac_addr, NULL, NULL);
> +
> +	return 0;
> +}
> +
> +void get_stats_timer_handler(unsigned long context)
> +{
> +	be_timer_ctxt_t *ctxt = (be_timer_ctxt_t *) context;
> +	if (atomic_read(&ctxt->get_stat_flag)) {
> +		atomic_dec(&ctxt->get_stat_flag);
> +		up((PVOID) ctxt->get_stat_sem);
> +	}
> +	del_timer(&ctxt->get_stats_timer);
> +	return;
> +}
> +
> +void get_stat_cb(PVOID context, BESTATUS status, MCC_WRB
> *optional_wrb) +{
> +	be_timer_ctxt_t *ctxt = (be_timer_ctxt_t *) context;
> +	/*
> +	 * just up the semaphore if the get_stat_flag
> +	 * reads 1. so that the waiter can continue.
> +	 * If it is 0, then it was handled by the timer handler.
> +	 */
> +	if (atomic_read(&ctxt->get_stat_flag)) {
> +		atomic_dec(&ctxt->get_stat_flag);
> +		up((PVOID) ctxt->get_stat_sem);
> +	}
> +}
> +
> +struct net_device_stats *benet_get_stats(struct net_device *dev)
> +{
> +	PBNI_NET_OBJECT pnob = dev->priv;
> +	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
> +	u64 pa;
> +	be_timer_ctxt_t *ctxt = adapter->ctxt;
> +
> +	if (!BE_DEV_STATE_OPEN(adapter) || (pm_resume)) {
> +		/* Return previously read stats */
> +		return &(adapter->benet_stats);
> +	}
> +	/* Get Physical Addr */
> +	pa = pci_map_single(adapter->pdev, adapter->eth_statsp,
> +			    sizeof(IOCTL_ETH_GET_STATISTICS),
> +			    PCI_DMA_FROMDEVICE);
> +	pa = cpu_to_le64(pa);
> +	ctxt->get_stat_sem = (unsigned
> long)&adapter->get_eth_stat_sem;
> +	bni_get_stats(adapter->net_obj, adapter->eth_statsp,
> +		      pa, get_stat_cb, (PVOID) ctxt);
> +	atomic_inc(&ctxt->get_stat_flag);
> +	ctxt->get_stats_timer.data = (unsigned long)ctxt;
> +	mod_timer(&ctxt->get_stats_timer, (jiffies + (HZ * 2)));
> +	down((PVOID) ctxt->get_stat_sem); /* block till callback is
> called */ +
> +	/*Adding port0 and port1 stats. */
> +	adapter->benet_stats.rx_packets =
> +	    adapter->eth_statsp->params.response.p0recvdtotalframes +
> +	    adapter->eth_statsp->params.response.p1recvdtotalframes;
> +	adapter->benet_stats.tx_packets =
> +	    adapter->eth_statsp->params.response.p0xmitunicastframes
> +
> +	    adapter->eth_statsp->params.response.p1xmitunicastframes;
> +	adapter->benet_stats.tx_bytes =
> +	    adapter->eth_statsp->params.response.p0xmitbyteslsd +
> +	    adapter->eth_statsp->params.response.p1xmitbyteslsd;
> +	adapter->benet_stats.rx_errors =
> +	    adapter->eth_statsp->params.response.p0crcerrors +
> +	    adapter->eth_statsp->params.response.p1crcerrors;
> +	adapter->benet_stats.rx_errors +=
> +	    adapter->eth_statsp->params.response.p0alignmentsymerrs +
> +	    adapter->eth_statsp->params.response.p1alignmentsymerrs;
> +	adapter->benet_stats.rx_errors +=
> +	    adapter->eth_statsp->params.response.p0inrangelenerrors +
> +	    adapter->eth_statsp->params.response.p1inrangelenerrors;
> +	adapter->benet_stats.rx_bytes =
> +
> adapter->eth_statsp->params.response.p0recvdtotalbytesLSD +
> +
> adapter->eth_statsp->params.response.p1recvdtotalbytesLSD;
> +	adapter->benet_stats.rx_crc_errors =
> +	    adapter->eth_statsp->params.response.p0crcerrors +
> +	    adapter->eth_statsp->params.response.p1crcerrors;
> +
> +	adapter->benet_stats.tx_packets +=
> +
> adapter->eth_statsp->params.response.p0xmitmulticastframes +
> +
> adapter->eth_statsp->params.response.p1xmitmulticastframes;
> +	adapter->benet_stats.tx_packets +=
> +
> adapter->eth_statsp->params.response.p0xmitbroadcastframes +
> +
> adapter->eth_statsp->params.response.p1xmitbroadcastframes;
> +	adapter->benet_stats.tx_errors = 0;
> +
> +	adapter->benet_stats.multicast =
> +
> adapter->eth_statsp->params.response.p0xmitmulticastframes +
> +
> adapter->eth_statsp->params.response.p1xmitmulticastframes; +
> +	adapter->benet_stats.rx_fifo_errors =
> +
> adapter->eth_statsp->params.response.p0rxfifooverflowdropped +
> +
> adapter->eth_statsp->params.response.p1rxfifooverflowdropped;
> +	adapter->benet_stats.rx_frame_errors =
> +	    adapter->eth_statsp->params.response.p0alignmentsymerrs +
> +	    adapter->eth_statsp->params.response.p1alignmentsymerrs;
> +	adapter->benet_stats.rx_length_errors =
> +	    adapter->eth_statsp->params.response.p0inrangelenerrors +
> +	    adapter->eth_statsp->params.response.p1inrangelenerrors;
> +	adapter->benet_stats.rx_length_errors +=
> +	    adapter->eth_statsp->params.response.p0outrangeerrors +
> +	    adapter->eth_statsp->params.response.p1outrangeerrors;
> +	adapter->benet_stats.rx_length_errors +=
> +
> adapter->eth_statsp->params.response.p0frametoolongerrors +
> +
> adapter->eth_statsp->params.response.p1frametoolongerrors; +
> +	pci_unmap_single(adapter->pdev, (ulong) adapter->eth_statsp,
> +			 sizeof(IOCTL_ETH_GET_STATISTICS),
> +			 PCI_DMA_FROMDEVICE);
> +	return &(adapter->benet_stats);
> +
> +}
> +
> +/*
> + * function called by the stack for transmitting an ether frame
> + */
> +int benet_xmit(struct sk_buff *skb, struct net_device *netdev)
> +{
> +	PBNI_NET_OBJECT pnob = netdev->priv;
> +	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
> +	u8 proto;
> +	struct iphdr *ip;
> +	u16 lso_mss;
> +#ifdef NETIF_F_TSO
> +	u32 segs;
> +
> +	lso_mss = skb_shinfo(skb)->gso_size;
> +	segs = skb_shinfo(skb)->gso_segs;
> +	/*
> +	 * bug# 3356.
> +	 * If a LSO request translates into a single segment,
> +	 * it should be posted as a ethernet WRB with no LSO.
> +	 */
> +	if (segs == 1)
> +		lso_mss = 0;
> +#else
> +	lso_mss = 0;
> +#endif /*TSO */
> +
> +	TRACE(DL_SEND, "benet_xmit: Entry... len = %d", skb->len);
> +
> +	if (skb->ip_summed == CHECKSUM_PARTIAL) {
> +		ip = (struct iphdr *)ip_hdr(skb);
> +		proto = ip->protocol;
> +	} else {
> +		proto = 0;
> +	}
> +
> +	if (betx_ether_frame(adapter, pnob, skb, proto, 0,
> lso_mss) !=
> +						BE_SUCCESS) {
> +		return 1;	/* NETDEV_TX_BUSY */
> +	}
> +
> +	netdev->trans_start = jiffies;
> +	TRACE(DL_SEND, "benet_xmit() : Exit");
> +	return 0;		/*NETDEV_TX_OK */
> +
> +}
> +
> +/*
> + * This is the driver entry point to change the mtu of the device
> + * Returns 0 for success and errno for failure.
> + */
> +int benet_change_mtu(struct net_device *netdev, int new_mtu)
> +{
> +	u32 mtu, max_mtu, max_hdr;
> +	max_hdr = BE_ENET_HEADER_SIZE + BE_ETHERNET_FCS_SIZE +
> +	    BE_SNAP_HEADER_SIZE + BE_HEADER_802_2_SIZE;
> +
> +	if (netdev->priv_flags & IFF_802_1Q_VLAN)
> +		max_hdr += BE_VLAN_HEADER_SIZE;
> +
> +	mtu = new_mtu + max_hdr;
> +
> +	/*
> +	 * BE supports jumbo frame size upto 9000 bytes including
> the link layer
> +	 * header. Considering the different variants of frame
> formats possible
> +	 * like VLAN, SNAP/LLC, the maximum possible value for MTU
> is 8974 bytes
> +	 */
> +	max_mtu = BE_MAX_JUMBO_FRAME_SIZE;
> +
> +	if ((mtu < BE_MIN_ETHER_FRAME_SIZE) || (mtu > max_mtu)) {
> +		printk(KERN_WARNING "Invalid MTU requested. "
> +		       "Must be between %d and %d bytes\n",
> +		       BE_MIN_SUPPORT_FRAME_SIZE, (max_mtu -
> max_hdr));
> +		return -EINVAL;
> +	}
> +	printk(KERN_INFO "MTU changed from %d to %d\n", netdev->mtu,
> +	       new_mtu);
> +	netdev->mtu = new_mtu;
> +	return 0;
> +}
> +
> +/*
> + * This is the driver entry point to register a vlan with the device
> + */
> +void benet_vlan_register(struct net_device *netdev, struct
> vlan_group *grp) +{
> +	PBNI_NET_OBJECT pnob = netdev->priv;
> +
> +	TRACE(DL_VLAN, "vlan register called");
> +
> +	disable_eq_intr(pnob);
> +	OSM_NOB(pnob)->vlan_grp = grp;
> +	OSM_NOB(pnob)->num_vlans = 0;
> +	enable_eq_intr(pnob);
> +}
> +
> +/*
> + * This is the driver entry point to add a vlan vlan_id
> + * with the device netdev
> + */
> +void benet_vlan_add_vid(struct net_device *netdev, u16 vlan_id)
> +{
> +	PBNI_NET_OBJECT pnob = netdev->priv;
> +
> +	TRACE(DL_VLAN, "Add vlan ID");
> +	if (OSM_NOB(pnob)->num_vlans == (BE_NUM_VLAN_SUPPORTED-1)) {
> +		/* no  way to return an error */
> +		printk(KERN_ERR
> +			"BladeEngine: Cannot configure more than %d
> Vlans\n",
> +				BE_NUM_VLAN_SUPPORTED);
> +		return;
> +	}
> +	/*The new vlan tag will be in the slot indicated by
> num_vlans. */
> +	OSM_NOB(pnob)->vlan_tag[OSM_NOB(pnob)->num_vlans++] =
> vlan_id;
> +	bni_config_vlan(pnob, OSM_NOB(pnob)->vlan_tag,
> +			OSM_NOB(pnob)->num_vlans, NULL, NULL, 0);
> +}
> +
> +/*
> + * This is the driver entry point to remove a vlan vlan_id
> + * with the device netdev
> + */
> +void benet_vlan_rem_vid(struct net_device *netdev, u16 vlan_id)
> +{
> +	PBNI_NET_OBJECT pnob = netdev->priv;
> +
> +	u32 i, value;
> +
> +	TRACE(DL_VLAN, "Remove vlan ID");
> +	/*
> +	 * In Blade Engine, we support 32 vlan tag filters across
> both ports.
> +	 * To program a vlan tag, the RXF_RTPR_CSR register is used.
> +	 * Each 32-bit value of RXF_RTDR_CSR can address 2 vlan tag
> entries.
> +	 * The Vlan table is of depth 16. thus we support 32 tags.
> +	 */
> +
> +	value = vlan_id | VLAN_VALID_BIT;
> +	TRACE(DL_VLAN, "Value is %x", value);
> +	TRACE(DL_VLAN, "Number of vlan tags is %d",
> OSM_NOB(pnob)->num_vlans);
> +	for (i = 0; i < BE_NUM_VLAN_SUPPORTED; i++) {
> +		TRACE(DL_VLAN, "Value at index %d is %x", i,
> +		      OSM_NOB(pnob)->vlan_tag[i]);
> +		if (OSM_NOB(pnob)->vlan_tag[i] == vlan_id) {
> +			TRACE(DL_VLAN, "Vlan ID found at index %d",
> i);
> +			break;
> +		}
> +	}
> +
> +	if (i == BE_NUM_VLAN_SUPPORTED) {
> +		TRACE(DL_VLAN, "Vlan ID %d not dound - remove
> failed", value);
> +		return;
> +	}
> +	/* Now compact the vlan tag array by removing hole created.
> */
> +	while ((i + 1) < BE_NUM_VLAN_SUPPORTED) {
> +		OSM_NOB(pnob)->vlan_tag[i] =
> OSM_NOB(pnob)->vlan_tag[i + 1];
> +		i++;
> +	}
> +	if ((i + 1) == BE_NUM_VLAN_SUPPORTED) {
> +		OSM_NOB(pnob)->vlan_tag[i] = (u16) 0x0;
> +	}
> +	OSM_NOB(pnob)->num_vlans--;
> +	bni_config_vlan(pnob, OSM_NOB(pnob)->vlan_tag,
> +			OSM_NOB(pnob)->num_vlans, NULL, NULL, 0);
> +	TRACE(DL_VLAN, "Removed the vlan ID of %d", vlan_id);
> +}
> +
> +/*
> + * This function is called to program multicast
> + * address in the multicast filter of the ASIC.
> + */
> +void be_set_multicast_filter(struct net_device *netdev)
> +{
> +	PBNI_NET_OBJECT pnob = netdev->priv;
> +	struct dev_mc_list *mc_ptr;
> +	SA_MAC_ADDRESS mac_addr[32];
> +	int i;
> +
> +	if (netdev->flags & IFF_ALLMULTI) {
> +		/* set BE in Multicast promiscuous */
> +		bni_set_mc_filter(pnob, 0, TRUE, NULL, NULL, NULL);
> +		return;
> +	}
> +
> +	for (mc_ptr = netdev->mc_list, i = 0; mc_ptr;
> +	     mc_ptr = mc_ptr->next, i++) {
> +		memcpy(mac_addr[i].bytes, mc_ptr->dmi_addr,
> +		       SA_MAC_ADDRESS_SIZE);
> +	}
> +	/* reset the promiscuous mode also. */
> +	bni_set_mc_filter(pnob, i, FALSE, mac_addr, NULL, NULL);
> +
> +}
> +
> +/*
> + * This is the driver entry point to set multicast list
> + * with the device netdev. This function will be used to
> + * set promiscuous mode or multicast promiscuous mode
> + * or multicast mode....
> + */
> +void benet_set_multicast_list(struct net_device *netdev)
> +{
> +	PBNI_NET_OBJECT pnob = netdev->priv;
> +	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
> +
> +	if (netdev->flags & IFF_PROMISC) {
> +		bni_set_promisc(adapter->net_obj);
> +
> +	} else if (netdev->flags & IFF_ALLMULTI) {
> +		bni_reset_promisc(adapter->net_obj);
> +		be_set_multicast_filter(netdev);
> +	} else {
> +		bni_reset_promisc(adapter->net_obj);
> +		be_set_multicast_filter(netdev);
> +	}
> +}
> +
> +#ifdef CONFIG_NET_POLL_CONTROLLER
> +static void be_netpoll(struct net_device *netdev)
> +{
> +	disable_irq(netdev->irq);
> +	be_int(netdev->irq, netdev, NULL);
> +	enable_irq(netdev->irq);
> +}
> +#endif
> +
> +/*
> + * standard entry point functions for all Linux network interface
> drivers
> + */
> +int benet_probe(struct net_device *netdev)
> +{
> +	PBNI_NET_OBJECT pnob = netdev->priv;
> +	PBE_ADAPTER adapter = OSM_NOB(pnob)->adapter;
> +
> +	TRACE(DL_INIT, "entered-benet_probe().");
> +
> +	ether_setup(netdev);
> +
> +	netdev->open = &benet_open;
> +	netdev->stop = &benet_close;
> +	netdev->do_ioctl = &benet_ioctl;
> +
> +	netdev->hard_start_xmit = &benet_xmit;
> +
> +	netdev->get_stats = &benet_get_stats;
> +
> +#ifdef CONFIG_NET_POLL_CONTROLLER
> +	netdev->poll_controller = &be_netpoll;
> +#endif
> +
> +	netdev->set_multicast_list = &benet_set_multicast_list;
> +
> +	netdev->change_mtu = &benet_change_mtu;
> +	netdev->set_mac_address = &benet_set_mac_addr;
> +
> +	netdev->vlan_rx_register = benet_vlan_register;
> +	netdev->vlan_rx_add_vid = benet_vlan_add_vid;
> +	netdev->vlan_rx_kill_vid = benet_vlan_rem_vid;
> +
> +	netdev->features =
> +	    NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_HW_VLAN_RX |
> +	    NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER |
> NETIF_F_IP_CSUM; +
> +	netdev->flags |= IFF_MULTICAST;
> +
> +	/* If device is DAC Capable, set the HIGHDMA flag for
> netdevice. */
> +	if (adapter->dma_64bit_cap)
> +		netdev->features |= NETIF_F_HIGHDMA;
> +
> +#ifdef NETIF_F_TSO

NETIF_F_TSO is always defined.

> +	netdev->features |= NETIF_F_TSO;
> +#endif
> +
> +	be_set_ethtool_ops(netdev);
> +
> +	return 0;
> +}
> 
> ___________________________________________________________________________________
> This message, together with any attachment(s), contains confidential
> and proprietary information of ServerEngines Corporation and is
> intended only for the designated recipient(s) named above. Any
> unauthorized review, printing, retention, copying, disclosure or
> distribution is strictly prohibited.  If you are not the intended
> recipient of this message, please immediately advise the sender by
> reply email message and delete all copies of this message and any
> attachment(s). Thank you.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [BUG] IPv6 recursive locking
From: Kristof Provost @ 2008-02-17 14:12 UTC (permalink / raw)
  To: netdev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm running the current git (1309d4e68497184d2fd87e892ddf14076c2bda98) 
without problems. While I was toying with IPv6 on my local network I managed 
to completely hang my machine whenever it receives or sends a neighbour
sollictation. At least, I think that's the cause. It started as soon as I 
installed radvd on the router. The included trace seems to point in the same
direction.

The machine is a Dell Latitude D505 (so x86). Network interfaces are e100 and
ipw2200 (firmware not loaded). I'm currently using the e100.

I'll try to bisect it but here's the trace already. Let me know if
there's anything else you'd like to know.

[  124.439831] =============================================
[  124.443689] [ INFO: possible recursive locking detected ]
[  124.443689] 2.6.25-rc2 #33
[  124.443689] ---------------------------------------------
[  124.443689] swapper/0 is trying to acquire lock:
[  124.443689]  (&n->lock){-+-+}, at: [<c0468d39>] neigh_resolve_output+0x139/0x290
[  124.443689]
[  124.443689] but task is already holding lock:
[  124.443689]  (&n->lock){-+-+}, at: [<c0468ea4>] neigh_timer_handler+0x14/0x280
[  124.443689]
[  124.443689] other info that might help us debug this:
[  124.443689] 1 lock held by swapper/0:
[  124.443689]  #0:  (&n->lock){-+-+}, at: [<c0468ea4>] neigh_timer_handler+0x14/0x280
[  124.443689]
[  124.443689] stack backtrace:
[  124.443689] Pid: 0, comm: swapper Not tainted 2.6.25-rc2 #33
[  124.443689]  [<c014863a>] __lock_acquire+0xd3a/0xf40
[  124.443689]  [<c0137ec8>] __kernel_text_address+0x18/0x30
[  124.443689]  [<c01488a0>] lock_acquire+0x60/0x80
[  124.443689]  [<c0468d39>] neigh_resolve_output+0x139/0x290
[  124.443689]  [<c059287e>] _write_lock_bh+0x2e/0x40
[  124.443689]  [<c0468d39>] neigh_resolve_output+0x139/0x290
[  124.443689]  [<c0468d39>] neigh_resolve_output+0x139/0x290
[  124.443689]  [<c0148805>] __lock_acquire+0xf05/0xf40
[  124.443689]  [<c04e1650>] ndisc_dst_alloc+0xe0/0x170
[  124.443689]  [<c04d39f4>] ip6_output_finish+0xa4/0x110
[  124.443689]  [<c0147a1d>] __lock_acquire+0x11d/0xf40
[  124.443689]  [<c04d4759>] ip6_output+0x5b9/0xba0
[  124.443689]  [<c0456eb6>] sock_alloc_send_skb+0x176/0x1d0
[  124.443689]  [<c04e4eab>] __ndisc_send+0x33b/0x540
[  124.443690]  [<c04e4d6e>] __ndisc_send+0x1fe/0x540
[  124.443690]  [<c04e5b69>] ndisc_send_ns+0x69/0xa0
[  124.443690]  [<c04e6c8e>] ndisc_solicit+0xee/0x1b0
[  124.443690]  [<c01472b5>] mark_held_locks+0x35/0x80
[  124.443690]  [<c0592c65>] _spin_unlock_irqrestore+0x45/0x60
[  124.443690]  [<c01473f9>] trace_hardirqs_on+0x79/0x130
[  124.443690]  [<c012f99f>] __mod_timer+0x9f/0xb0
[  124.443690]  [<c0468fd3>] neigh_timer_handler+0x143/0x280
[  124.443690]  [<c012f2ca>] run_timer_softirq+0x14a/0x1c0
[  124.443690]  [<c0468e90>] neigh_timer_handler+0x0/0x280
[  124.443690]  [<c0468e90>] neigh_timer_handler+0x0/0x280
[  124.443690]  [<c012b4c4>] __do_softirq+0x84/0x100
[  124.443690]  [<c012b595>] do_softirq+0x55/0x60
[  124.443690]  [<c012b9e5>] irq_exit+0x65/0x80
[  124.443690]  [<c01073b0>] do_IRQ+0x40/0x70
[  124.443690]  [<c010585e>] common_interrupt+0x2e/0x34
[  124.443690]  [<c032007b>] acpi_power_on+0x3b/0x104
[  124.443690]  [<c0322af6>] acpi_idle_enter_simple+0x194/0x1fe
[  124.443690]  [<c0322727>] acpi_idle_enter_bm+0xc1/0x2fc
[  124.443690]  [<c03fff43>] cpuidle_idle_call+0x63/0xb0
[  124.443690]  [<c03ffee0>] cpuidle_idle_call+0x0/0xb0
[  124.443690]  [<c010380d>] cpu_idle+0x5d/0xf0
[  124.443690]  =======================

Kristof

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHuEDNUEZ9DhGwDugRAgHaAJ9L6i924sEqim1Ti+rZH2qmGESx6wCfWYIY
PI1kcoY3SWN/O9TOLgGQC20=
=cvKu
-----END PGP SIGNATURE-----

^ permalink raw reply

* Re: [PATHCH 0/16]  ServerEngines 10Gb NIC driver
From: Sam Ravnborg @ 2008-02-17 13:35 UTC (permalink / raw)
  To: Subbu Seetharaman; +Cc: netdev
In-Reply-To: <20080217132536.GA11132@uranus.ravnborg.org>

On Sun, Feb 17, 2008 at 02:25:36PM +0100, Sam Ravnborg wrote:
> On Sat, Feb 16, 2008 at 07:51:13PM -0800, Subbu Seetharaman wrote:
> > Patch 0/16 and 15/16 of this series are getting dropped by the
> > spam filter.  I am trying to get them across with changes
> > that will please the spam filter.  Sorry about the inconvenience.
> > Below is the 0/16 of the series.
> > 
> > --------------------------
> > Hi,
> > 
> > 
> > I am sending a patch for network driver for ServerEngines 10Gb Network adapter for review.  This patch includes the network driver and the OS neutral code that implements the interactions between the host drivers and the adapter. The adapter is a dual function device with network and storage functions.  The network driver is a regular NIC driver.  
> > 
> > The low level library that manages the interaction with the adapter is common to both storage and network drivers and hence is organized under the directory drivers/message/beclib. The storage driver is not part of this patch and will be submitted after this review.
> > 
> > This patch is made against 2.6.24.2 version of the kernel source.
> 
> Hi Subbu.
> 
> A few points about your submission (not your code as I have not looked at it).
> - Use descriptive subjects - and not the same subject for all patches
> - Include in each patch a diffstat - below the '^---' marker so
>   it is easy to spot what files are touched but so that the diffstat
>   does not get included in the changelog when applied.
> - Do not break the build. Adding Makefile/Kconfig bits as the last patch
>   usually does the trick here.
> - If you have generic funtionality add that first and then add what depnds on it
>   later.
> 
> 	Sam

I just tried scripts/checkpatch.pl - it said:

total: 250 errors, 837 warnings, 31889 lines checked

That was for the full patch-set.

I suggest you look into these. The goal is not to get down on 0/0
but close with some common sense applied.

	Sam

^ permalink raw reply

* Re: [PATHCH 0/16]  ServerEngines 10Gb NIC driver
From: Sam Ravnborg @ 2008-02-17 13:25 UTC (permalink / raw)
  To: Subbu Seetharaman; +Cc: netdev
In-Reply-To: <20080217035113.d5342ffc@mailhost.serverengines.com>

On Sat, Feb 16, 2008 at 07:51:13PM -0800, Subbu Seetharaman wrote:
> Patch 0/16 and 15/16 of this series are getting dropped by the
> spam filter.  I am trying to get them across with changes
> that will please the spam filter.  Sorry about the inconvenience.
> Below is the 0/16 of the series.
> 
> --------------------------
> Hi,
> 
> 
> I am sending a patch for network driver for ServerEngines 10Gb Network adapter for review.  This patch includes the network driver and the OS neutral code that implements the interactions between the host drivers and the adapter. The adapter is a dual function device with network and storage functions.  The network driver is a regular NIC driver.  
> 
> The low level library that manages the interaction with the adapter is common to both storage and network drivers and hence is organized under the directory drivers/message/beclib. The storage driver is not part of this patch and will be submitted after this review.
> 
> This patch is made against 2.6.24.2 version of the kernel source.

Hi Subbu.

A few points about your submission (not your code as I have not looked at it).
- Use descriptive subjects - and not the same subject for all patches
- Include in each patch a diffstat - below the '^---' marker so
  it is easy to spot what files are touched but so that the diffstat
  does not get included in the changelog when applied.
- Do not break the build. Adding Makefile/Kconfig bits as the last patch
  usually does the trick here.
- If you have generic funtionality add that first and then add what depnds on it
  later.

	Sam

^ permalink raw reply

* [2.6.25-rc2] e100: Trying to free already-free IRQ 11 during suspend ...
From: Andrey Borzenkov @ 2008-02-17 12:36 UTC (permalink / raw)
  To: e1000-devel; +Cc: netdev, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 2409 bytes --]

... and possibly reboot/poweroff (it flows by too fast to be legible).

[ 8803.850634] ACPI: Preparing to enter system sleep state S3
[ 8803.853141] Suspending console(s)
[ 8805.287505] serial 00:09: disabled
[ 8805.291564] Trying to free already-free IRQ 11
[ 8805.291579] Pid: 6920, comm: pm-suspend Not tainted 2.6.25-rc2-1avb #2
[ 8805.291628]  [<c0152127>] free_irq+0xb7/0x130
[ 8805.291675]  [<c024bd80>] e100_suspend+0xc0/0x100
[ 8805.291724]  [<c01eaa36>] pci_device_suspend+0x26/0x70
[ 8805.291747]  [<c0243674>] suspend_device+0x94/0xd0
[ 8805.291763]  [<c02439a3>] device_suspend+0x153/0x240
[ 8805.291784]  [<c014314f>] suspend_devices_and_enter+0x4f/0xf0
[ 8805.291808]  [<c0143a5f>] ? freeze_processes+0x3f/0x80
[ 8805.291825]  [<c01432fa>] enter_state+0xaa/0x140
[ 8805.291840]  [<c014341f>] state_store+0x8f/0xd0
[ 8805.291852]  [<c0143390>] ? state_store+0x0/0xd0
[ 8805.291866]  [<c01d3404>] kobj_attr_store+0x24/0x30
[ 8805.291901]  [<c01b547b>] sysfs_write_file+0xbb/0x110
[ 8805.291936]  [<c0177d79>] vfs_write+0x99/0x130
[ 8805.291963]  [<c01b53c0>] ? sysfs_write_file+0x0/0x110
[ 8805.291979]  [<c01782fd>] sys_write+0x3d/0x70
[ 8805.291998]  [<c010409a>] sysenter_past_esp+0x5f/0xa5
[ 8805.292038]  =======================
[ 8805.347640] ACPI: PCI interrupt for device 0000:00:06.0 disabled
[ 8805.361128] ACPI: PCI interrupt for device 0000:00:02.0 disabled
[ 8805.376670]  hwsleep-0322 [00] enter_sleep_state     : Entering sleep state [S3]
[ 8805.376670] Back to C!

Interface is unused normally (only for netconsole sometimes). dmesg and config
attached.

Hmm ... after resume device has disappeared at all ...

{pts/1}% cat /proc/interrupts
           CPU0
  0:    1290492    XT-PIC-XT        timer
  1:       6675    XT-PIC-XT        i8042
  2:          0    XT-PIC-XT        cascade
  3:          2    XT-PIC-XT
  4:          2    XT-PIC-XT
  5:          3    XT-PIC-XT
  7:          4    XT-PIC-XT        irda0
  8:          0    XT-PIC-XT        rtc0
  9:        583    XT-PIC-XT        acpi
 10:          2    XT-PIC-XT
 11:      31483    XT-PIC-XT        yenta, yenta, yenta, ohci_hcd:usb1, ALI 5451, pcmcia0.0
 12:      28070    XT-PIC-XT        i8042
 14:      21705    XT-PIC-XT        ide0
 15:      82123    XT-PIC-XT        ide1
NMI:          0   Non-maskable interrupts
TRM:          0   Thermal event interrupts
SPU:          0   Spurious interrupts
ERR:          0

[-- Attachment #1.2: dmesg --]
[-- Type: text/plain, Size: 36661 bytes --]

[    0.000000] Linux version 2.6.25-rc2-1avb (bor@cooker) (gcc version 4.2.2 20071128 (prerelease) (4.2.2-2mdv2008.1)) #2 Sun Feb 17 02:43:49 MSK 2008
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000e0000 - 00000000000eee00 (reserved)
[    0.000000]  BIOS-e820: 00000000000eee00 - 00000000000ef000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000000ef000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 000000001ef60000 (usable)
[    0.000000]  BIOS-e820: 000000001ef60000 - 000000001ef70000 (ACPI data)
[    0.000000]  BIOS-e820: 000000001ef70000 - 0000000020000000 (reserved)
[    0.000000]  BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
[    0.000000] 495MB LOWMEM available.
[    0.000000] Entering add_active_range(0, 0, 126816) 0 entries of 256 used
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA             0 ->     4096
[    0.000000]   Normal       4096 ->   126816
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0:        0 ->   126816
[    0.000000] On node 0 totalpages: 126816
[    0.000000]   DMA zone: 32 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 4064 pages, LIFO batch:0
[    0.000000]   Normal zone: 958 pages used for memmap
[    0.000000]   Normal zone: 121762 pages, LIFO batch:31
[    0.000000]   Movable zone: 0 pages used for memmap
[    0.000000] DMI 2.3 present.
[    0.000000] ACPI: RSDP 000F0090, 0014 (r0 TOSHIB)
[    0.000000] ACPI: RSDT 1EF60000, 0028 (r1 TOSHIB 750        970814 TASM  4010000)
[    0.000000] ACPI: FACP 1EF60054, 0084 (r2 TOSHIB 750        970814 TASM  4010000)
[    0.000000] ACPI: DSDT 1EF600D8, 68DA (r1 TOSHIB 4000     20020417 MSFT  100000A)
[    0.000000] ACPI: FACS 000EEE00, 0040
[    0.000000] ACPI: DMI detected: Toshiba
[    0.000000] ACPI: PM-Timer IO Port: 0xee08
[    0.000000] Allocating PCI resources starting at 30000000 (gap: 20000000:dff80000)
[    0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
[    0.000000] PM: Registered nosave memory: 00000000000e0000 - 00000000000ee000
[    0.000000] PM: Registered nosave memory: 00000000000ee000 - 00000000000ef000
[    0.000000] PM: Registered nosave memory: 00000000000ef000 - 0000000000100000
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 125826
[    0.000000] Kernel command line: BOOT_IMAGE=2.6.25-rc2-1avb root=LABEL=/ resume=LABEL=swap vga=791
[    0.000000] Enabling fast FPU save and restore... done.
[    0.000000] Enabling unmasked SIMD FPU exception support... done.
[    0.000000] Initializing CPU#0
[    0.000000] PID hash table entries: 2048 (order: 11, 8192 bytes)
[    0.000000] Detected 747.686 MHz processor.
[    0.003333] Console: colour dummy device 80x25
[    0.003333] console [tty0] enabled
[    0.003333] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.003333] ... MAX_LOCKDEP_SUBCLASSES:    8
[    0.003333] ... MAX_LOCK_DEPTH:          30
[    0.003333] ... MAX_LOCKDEP_KEYS:        2048
[    0.003333] ... CLASSHASH_SIZE:           1024
[    0.003333] ... MAX_LOCKDEP_ENTRIES:     8192
[    0.003333] ... MAX_LOCKDEP_CHAINS:      16384
[    0.003333] ... CHAINHASH_SIZE:          8192
[    0.003333]  memory used by lock dependency info: 1024 kB
[    0.003333]  per task-struct memory footprint: 1680 bytes
[    0.003333] ------------------------
[    0.003333] | Locking API testsuite:
[    0.003333] ----------------------------------------------------------------------------
[    0.003333]                                  | spin |wlock |rlock |mutex | wsem | rsem |
[    0.003333]   --------------------------------------------------------------------------
[    0.003333]                      A-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.003333]                  A-B-B-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.003333]              A-B-B-C-C-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.003333]              A-B-C-A-B-C deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.003333]          A-B-B-C-C-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.003333]          A-B-C-D-B-D-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.003333]          A-B-C-D-B-C-D-A deadlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.003333]                     double unlock:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.003333]                   initialize held:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.003333]                  bad unlock order:  ok  |  ok  |  ok  |  ok  |  ok  |  ok  |
[    0.003333]   --------------------------------------------------------------------------
[    0.003333]               recursive read-lock:             |  ok  |             |  ok  |
[    0.003333]            recursive read-lock #2:             |  ok  |             |  ok  |
[    0.003333]             mixed read-write-lock:             |  ok  |             |  ok  |
[    0.003333]             mixed write-read-lock:             |  ok  |             |  ok  |
[    0.003333]   --------------------------------------------------------------------------
[    0.003333]      hard-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
[    0.003333]      soft-irqs-on + irq-safe-A/12:  ok  |  ok  |  ok  |
[    0.003333]      hard-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
[    0.003333]      soft-irqs-on + irq-safe-A/21:  ok  |  ok  |  ok  |
[    0.003333]        sirq-safe-A => hirqs-on/12:  ok  |  ok  |  ok  |
[    0.003333]        sirq-safe-A => hirqs-on/21:  ok  |  ok  |  ok  |
[    0.003333]          hard-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
[    0.003333]          soft-safe-A + irqs-on/12:  ok  |  ok  |  ok  |
[    0.003333]          hard-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
[    0.003333]          soft-safe-A + irqs-on/21:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #1/123:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #1/132:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #1/213:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #1/231:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #1/312:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #1/321:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #2/123:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #2/132:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #2/213:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #2/231:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #2/312:  ok  |  ok  |  ok  |
[    0.003333]     hard-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
[    0.003333]     soft-safe-A + unsafe-B #2/321:  ok  |  ok  |  ok  |
[    0.003333]       hard-irq lock-inversion/123:  ok  |  ok  |  ok  |
[    0.003333]       soft-irq lock-inversion/123:  ok  |  ok  |  ok  |
[    0.003333]       hard-irq lock-inversion/132:  ok  |  ok  |  ok  |
[    0.003333]       soft-irq lock-inversion/132:  ok  |  ok  |  ok  |
[    0.003333]       hard-irq lock-inversion/213:  ok  |  ok  |  ok  |
[    0.003333]       soft-irq lock-inversion/213:  ok  |  ok  |  ok  |
[    0.003333]       hard-irq lock-inversion/231:  ok  |  ok  |  ok  |
[    0.003333]       soft-irq lock-inversion/231:  ok  |  ok  |  ok  |
[    0.003333]       hard-irq lock-inversion/312:  ok  |  ok  |  ok  |
[    0.003333]       soft-irq lock-inversion/312:  ok  |  ok  |  ok  |
[    0.003333]       hard-irq lock-inversion/321:  ok  |  ok  |  ok  |
[    0.003333]       soft-irq lock-inversion/321:  ok  |  ok  |  ok  |
[    0.003333]       hard-irq read-recursion/123:  ok  |
[    0.003333]       soft-irq read-recursion/123:  ok  |
[    0.003333]       hard-irq read-recursion/132:  ok  |
[    0.003333]       soft-irq read-recursion/132:  ok  |
[    0.003333]       hard-irq read-recursion/213:  ok  |
[    0.003333]       soft-irq read-recursion/213:  ok  |
[    0.003333]       hard-irq read-recursion/231:  ok  |
[    0.003333]       soft-irq read-recursion/231:  ok  |
[    0.003333]       hard-irq read-recursion/312:  ok  |
[    0.003333]       soft-irq read-recursion/312:  ok  |
[    0.003333]       hard-irq read-recursion/321:  ok  |
[    0.003333]       soft-irq read-recursion/321:  ok  |
[    0.003333] -------------------------------------------------------
[    0.003333] Good, all 218 testcases passed! |
[    0.003333] ---------------------------------
[    0.003333] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.003333] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.003333] Memory: 494188k/507264k available (1865k kernel code, 12460k reserved, 896k data, 208k init, 0k highmem)
[    0.003333] virtual kernel memory layout:
[    0.003333]     fixmap  : 0xffff6000 - 0xfffff000   (  36 kB)
[    0.003333]     vmalloc : 0xdf800000 - 0xffff4000   ( 519 MB)
[    0.003333]     lowmem  : 0xc0000000 - 0xdef60000   ( 495 MB)
[    0.003333]       .init : 0xc03b6000 - 0xc03ea000   ( 208 kB)
[    0.003333]       .data : 0xc02d263b - 0xc03b2a20   ( 896 kB)
[    0.003333]       .text : 0xc0100000 - 0xc02d263b   (1865 kB)
[    0.003333] Checking if this processor honours the WP bit even in supervisor mode...Ok.
[    0.003333] CPA: page pool initialized 16 of 16 pages preallocated
[    0.003333] SLUB: Genslabs=12, HWalign=32, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
[    0.086673] Calibrating delay using timer specific routine.. 1499.07 BogoMIPS (lpj=2497726)
[    0.087000] Mount-cache hash table entries: 512
[    0.089327] CPU: L1 I cache: 16K, L1 D cache: 16K
[    0.089357] CPU: L2 cache: 256K
[    0.089401] Compat vDSO mapped to ffffe000.
[    0.089442] CPU: Intel Pentium III (Coppermine) stepping 0a
[    0.089479] Checking 'hlt' instruction... OK.
[    0.100806] Freeing SMP alternatives: 0k freed
[    0.101921] checking if image is initramfs... it is
[    0.673154] Freeing initrd memory: 2418k freed
[    0.673374] ACPI: Core revision 20070126
[    0.682630] ACPI: Checking initramfs for custom DSDT
[    0.703572] Parsing all Control Methods:
[    0.703913] Table [DSDT](id 0001) - 683 Objects with 60 Devices 195 Methods 10 Regions
[    0.703962]  tbxface-0598 [00] tb_load_namespace     : ACPI Tables successfully acquired
[    0.704002] ACPI: setting ELCR to 0200 (from 0a00)
[    0.704621] evxfevnt-0091 [00] enable                : Transition to ACPI mode successful
[    0.708468] net_namespace: 236 bytes
[    0.711573] NET: Registered protocol family 16
[    0.714218] ACPI: bus type pci registered
[    0.716067] PCI: PCI BIOS revision 2.10 entry at 0xfe5ae, last bus=5
[    0.716119] PCI: Using configuration type 1
[    0.716134] Setting up standard PCI resources
[    0.730878] evgpeblk-0956 [00] ev_create_gpe_block   : GPE 00 to 3F [_GPE] 8 regs on int 0x9
[    0.733847] evgpeblk-1052 [00] ev_initialize_gpe_bloc: Found 3 Wake, Enabled 0 Runtime GPEs in this block
[    0.733905] ACPI: EC: Look up EC in DSDT
[    0.742487] Completing Region/Field/Buffer/Package initialization:.....................................
[    0.745218] Initialized 5/10 Regions 0/0 Fields 16/16 Buffers 16/27 Packages (692 nodes)
[    0.745250] Initializing Device/Processor/Thermal objects by executing _INI methods:.
[    0.747941] Executed 1 _INI methods requiring 0 _STA executions (examined 64 objects)
[    0.748023] ACPI: Interpreter enabled
[    0.748041] ACPI: (supports S0 S3 S4 S5)
[    0.748193] ACPI: Using PIC for interrupt routing
[    0.785720] ACPI: PCI Root Bridge [PCI0] (0000:00)
[    0.787796] pci 0000:00:08.0: quirk: region ee00-ee3f claimed by ali7101 ACPI
[    0.787844] pci 0000:00:08.0: quirk: region ef00-ef1f claimed by ali7101 SMB
[    0.789217] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[    0.789705] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT]
[    0.820681] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 10 *11)
[    0.821451] ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 10 *11)
[    0.822149] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 10 *11)
[    0.822842] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 10 *11)
[    0.823670] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 6 7 10 *11)
[    0.824371] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 6 7 10 *11)
[    0.825858] ACPI: Power Resource [PFAN] (off)
[    0.826327] Linux Plug and Play Support v0.97 (c) Adam Belay
[    0.826689] pnp: PnP ACPI init
[    0.826878] ACPI: bus type pnp registered
[    0.853020] pnp: PnP ACPI: found 12 devices
[    0.853079] ACPI: ACPI bus type pnp unregistered
[    0.854964] PCI: Using ACPI for IRQ routing
[    0.855005] PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report
[    0.866248] Time: tsc clocksource has been installed.
[    0.866796] ACPI: RTC can wake from S4
[    0.867001] system 00:00: iomem range 0x0-0x9ffff could not be reserved
[    0.867030] system 00:00: iomem range 0xe0000-0xeffff could not be reserved
[    0.867057] system 00:00: iomem range 0xf0000-0xfffff could not be reserved
[    0.867084] system 00:00: iomem range 0x100000-0x1ef5ffff could not be reserved
[    0.867113] system 00:00: iomem range 0x1ef60000-0x1ef6ffff could not be reserved
[    0.867143] system 00:00: iomem range 0x1f000000-0x1fffffff could not be reserved
[    0.867172] system 00:00: iomem range 0x1ef70000-0x1effffff could not be reserved
[    0.867202] system 00:00: iomem range 0xffe00000-0xffffffff could not be reserved
[    0.867290] system 00:08: ioport range 0x370-0x371 has been reserved
[    0.867316] system 00:08: ioport range 0x40b-0x40b has been reserved
[    0.867340] system 00:08: ioport range 0x480-0x48f has been reserved
[    0.867364] system 00:08: ioport range 0x4d0-0x4d1 has been reserved
[    0.867387] system 00:08: ioport range 0x4d6-0x4d6 has been reserved
[    0.867411] system 00:08: ioport range 0x6c0-0x6ff has been reserved
[    0.867435] system 00:08: ioport range 0xe000-0xe07f has been reserved
[    0.867459] system 00:08: ioport range 0xe080-0xe0ff has been reserved
[    0.867483] system 00:08: ioport range 0xe400-0xe47f has been reserved
[    0.867508] system 00:08: ioport range 0xe480-0xe4ff has been reserved
[    0.867532] system 00:08: ioport range 0xe800-0xe87f has been reserved
[    0.867556] system 00:08: ioport range 0xe880-0xe8ff has been reserved
[    0.867580] system 00:08: ioport range 0xec00-0xec7f has been reserved
[    0.867604] system 00:08: ioport range 0xec80-0xecff has been reserved
[    0.867630] system 00:08: ioport range 0xee00-0xee41 could not be reserved
[    0.867655] system 00:08: ioport range 0xee90-0xee9f has been reserved
[    0.867679] system 00:08: ioport range 0xeeac-0xeeac has been reserved
[    0.867704] system 00:08: ioport range 0xef00-0xef3f could not be reserved
[    0.867729] system 00:08: ioport range 0xef40-0xef5f has been reserved
[    0.902724] PCI: Bridge: 0000:00:01.0
[    0.902773]   IO window: disabled.
[    0.902801]   MEM window: 0xf7f00000-0xfdffffff
[    0.902826]   PREFETCH window: disabled.
[    0.902859] PCI: Bus 2, cardbus bridge: 0000:00:10.0
[    0.902878]   IO window: 0x00001000-0x000010ff
[    0.902903]   IO window: 0x00001400-0x000014ff
[    0.902927]   PREFETCH window: 0x30000000-0x33ffffff
[    0.902953]   MEM window: 0x34000000-0x37ffffff
[    0.902978] PCI: Bus 6, cardbus bridge: 0000:00:11.0
[    0.902995]   IO window: 0x00001800-0x000018ff
[    0.903019]   IO window: 0x00001c00-0x00001cff
[    0.903044]   PREFETCH window: 0x38000000-0x3bffffff
[    0.903070]   MEM window: 0x3c000000-0x3fffffff
[    0.903095] PCI: Bus 10, cardbus bridge: 0000:00:11.1
[    0.903113]   IO window: 0x00002000-0x000020ff
[    0.903137]   IO window: 0x00002400-0x000024ff
[    0.903161]   PREFETCH window: 0x40000000-0x43ffffff
[    0.903187]   MEM window: 0x44000000-0x47ffffff
[    0.903242] PCI: Setting latency timer of device 0000:00:01.0 to 64
[    0.903346] PCI: Enabling device 0000:00:10.0 (0000 -> 0003)
[    0.905022] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
[    0.905055] PCI: setting IRQ 11 as level-triggered
[    0.905064] ACPI: PCI Interrupt 0000:00:10.0[A] -> Link [LNKC] -> GSI 11 (level, low) -> IRQ 11
[    0.905155] PCI: Enabling device 0000:00:11.0 (0000 -> 0003)
[    0.906268] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
[    0.906291] ACPI: PCI Interrupt 0000:00:11.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
[    0.906374] PCI: Enabling device 0000:00:11.1 (0000 -> 0003)
[    0.907529] ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
[    0.907552] ACPI: PCI Interrupt 0000:00:11.1[B] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
[    0.907656] NET: Registered protocol family 2
[    0.908639] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.910600] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    0.911366] TCP bind hash table entries: 16384 (order: 7, 589824 bytes)
[    0.917529] TCP: Hash tables configured (established 16384 bind 16384)
[    0.917770] TCP reno registered
[    0.923174] audit: initializing netlink socket (disabled)
[    0.923483] type=2000 audit(1203238344.923:1): initialized
[    0.947451] io scheduler noop registered
[    0.947509] io scheduler anticipatory registered
[    0.947528] io scheduler deadline registered
[    0.948145] io scheduler cfq registered (default)
[    0.948289] pci 0000:00:07.0: Activating ISA DMA hang workarounds
[    0.948388] pci 0000:01:00.0: Boot video device
[    0.949794] vesafb: framebuffer at 0xfc000000, mapped to 0xdf880000, using 3072k, total 16384k
[    0.949841] vesafb: mode is 1024x768x16, linelength=2048, pages=9
[    0.949862] vesafb: protected mode interface info at c000:775e
[    0.949883] vesafb: pmi: set display start = c00c777f, set palette = c00c77e2
[    0.949969] vesafb: scrolling: redraw
[    0.949989] vesafb: Truecolor: size=0:5:6:5, shift=0:11:5:0
[    1.021117] Console: switching to colour frame buffer device 128x48
[    1.083282] fb0: VESA VGA frame buffer device
[    1.352781] brd: module loaded
[    1.354826] e100: Intel(R) PRO/100 Network Driver, 3.5.23-k4-NAPI
[    1.355656] e100: Copyright(c) 1999-2006 Intel Corporation
[    1.358318] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
[    1.359107] ACPI: PCI Interrupt 0000:00:0a.0[A] -> Link [LNKD] -> GSI 11 (level, low) -> IRQ 11
[    1.389557] e100: eth0: e100_probe: addr 0xf7efd000, irq 11, MAC addr 00:00:39:d7:14:a1
[    1.390354] console [netcon0] enabled
[    1.393318] netconsole: network logging started
[    1.400970] PNP: PS/2 Controller [PNP0303:KBC,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
[    1.403458] Switched to high resolution mode on CPU 0
[    1.410426] serio: i8042 KBD port at 0x60,0x64 irq 1
[    1.413404] serio: i8042 AUX port at 0x60,0x64 irq 12
[    1.420149] mice: PS/2 mouse device common for all mice
[    1.424039] cpuidle: using governor ladder
[    1.426655] cpuidle: using governor menu
[    1.436212] TCP cubic registered
[    1.437383] NET: Registered protocol family 1
[    1.440094] Using IPI Shortcut mode
[    1.446663] BIOS EDD facility v0.16 2004-Jun-25, 16 devices found
[    1.458402] Freeing unused kernel memory: 208k freed
[    1.460155] Write protecting the kernel read-only data: 744k
[    1.492266] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
[    2.062397] Uniform Multi-Platform E-IDE driver
[    2.065562] ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
[    2.148193] ALI15X3: IDE controller (0x10b9:0x5229 rev 0xc3) at  PCI slot 0000:00:04.0
[    2.148944] ACPI: Unable to derive IRQ for device 0000:00:04.0
[    2.152193] ALI15X3: not 100% native mode: will probe irqs later
[    2.155726]     ide0: BM-DMA at 0xeff0-0xeff7, BIOS settings: hda:DMA, hdb:PIO
[    2.162170]     ide1: BM-DMA at 0xeff8-0xefff, BIOS settings: hdc:DMA, hdd:PIO
[    2.165501] Probing IDE interface ide0...
[    3.087592] hda: IC25N020ATDA04-0, ATA DISK drive
[    3.087833] hda: host max PIO5 wanted PIO255(auto-tune) selected PIO4
[    3.088156] hda: host side 80-wire cable detection failed, limiting max speed to UDMA33
[    3.090963] hda: UDMA/33 mode selected
[    3.094615] Probing IDE interface ide1...
[    4.440862] hdc: TOSHIBA DVD-ROM SD-C2502, ATAPI CD/DVD-ROM drive
[    4.441043] hdc: host max PIO5 wanted PIO255(auto-tune) selected PIO4
[    4.441428] hdc: UDMA/33 mode selected
[    4.445606] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
[    4.474714] ide1 at 0x170-0x177,0x376 on irq 15
[    4.480074] hda: max request size: 128KiB
[    4.482087] hda: 39070080 sectors (20003 MB) w/1806KiB Cache, CHS=38760/16/63
[    4.484751] hda: cache flushes not supported
[    4.492186]  hda: hda1 hda2
[    4.811550] ReiserFS: hda2: found reiserfs format "3.6" with standard journal
[    4.814835] ReiserFS: hda2: using ordered data mode
[    4.856293] ReiserFS: hda2: journal params: device hda2, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
[    4.868102] ReiserFS: hda2: checking transaction log (hda2)
[    4.929981] ReiserFS: hda2: Using r5 hash to sort names
[   13.051622] Linux agpgart interface v0.103
[   13.091384] Yenta: CardBus bridge found at 0000:00:10.0 [12a3:ab01]
[   13.091455] Yenta: Using CSCINT to route CSC interrupts to PCI
[   13.091463] Yenta: Routing CardBus interrupts to PCI
[   13.091478] Yenta TI: socket 0000:00:10.0, mfunc 0x01000002, devctl 0x60
[   13.205776] hdc: ATAPI 24X DVD-ROM drive, 128kB Cache
[   13.205813] Uniform CD-ROM driver Revision: 3.20
[   13.221438] PCI: Enabling device 0000:00:08.0 (0000 -> 0001)
[   13.222514] ALi_M1535: initialized. timeout=60 sec (nowayout=0)
[   13.320934] Yenta: ISA IRQ mask 0x0000, PCI irq 11
[   13.320953] Socket status: 30000059
[   13.348110] Yenta: CardBus bridge found at 0000:00:11.0 [1179:0001]
[   13.474505] Yenta: ISA IRQ mask 0x04b8, PCI irq 11
[   13.474523] Socket status: 30000087
[   13.487317] Yenta: CardBus bridge found at 0000:00:11.1 [1179:0001]
[   13.614491] Yenta: ISA IRQ mask 0x04b8, PCI irq 11
[   13.614510] Socket status: 30000007
[   13.653174] agpgart: Detected ALi M1644 chipset
[   13.666109] agpgart: AGP aperture is 64M @ 0xf0000000
[   13.771819] ACPI: CPU0 (power states: C1[C1] C2[C2])
[   13.773125] ACPI: ACPI0007:00 is registered as cooling_device0
[   13.803785] input: PC Speaker as /devices/platform/pcspkr/input/input1
[   13.849164] input: Power Button (FF) as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
[   13.870415] ACPI: Power Button (FF) [PWRF]
[   13.871032] input: Lid Switch as /devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input3
[   13.880905] ACPI: Lid Switch [LID]
[   13.890413] ACPI: AC Adapter [ADP1] (on-line)
[   13.983754] pccard: PCMCIA card inserted into slot 0
[   13.988643] ACPI: Battery Slot [BAT1] (battery present)
[   13.988871] ACPI: Battery Slot [BAT2] (battery absent)
[   14.407044] ACPI: LNXTHERM:01 is registered as thermal_zone0
[   14.407985] ACPI: Thermal Zone [THRM] (64 C)
[   14.418860] usbcore: registered new interface driver usbfs
[   14.419417] usbcore: registered new interface driver hub
[   14.439706] usbcore: registered new device driver usb
[   14.534464] ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
[   14.536271] ACPI: PCI Interrupt Link [LNKG] enabled at IRQ 11
[   14.536289] ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [LNKG] -> GSI 11 (level, low) -> IRQ 11
[   14.536371] ohci_hcd 0000:00:02.0: OHCI Host Controller
[   14.696372] ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1
[   14.696595] ohci_hcd 0000:00:02.0: irq 11, io mem 0xf7eff000
[   14.815184] usb usb1: configuration #1 chosen from 1 choice
[   14.855818] hub 1-0:1.0: USB hub found
[   14.871641] hub 1-0:1.0: 3 ports detected
[   14.909523] input: ImPS/2 Generic Wheel Mouse as /devices/platform/i8042/serio1/input/input4
[   14.929279] ACPI: Transitioning device [FAN] to D3
[   14.929563] ACPI: PNP0C0B:00 is registered as cooling_device1
[   14.929596] ACPI: Fan [FAN] (off)
[   15.659717] ACPI: PCI Interrupt Link [LNKH] enabled at IRQ 11
[   15.659742] ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNKH] -> GSI 11 (level, low) -> IRQ 11
[   15.685243] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
[   15.724367] rtc_cmos 00:07: rtc core: registered rtc_cmos as rtc0
[   15.724468] rtc0: alarms up to one year
[   15.989650] serial 00:09: activated
[   16.215254] NET: Registered protocol family 23
[   16.320280] Detected unconfigured Toshiba laptop with ALi ISA bridge SMSC IrDA chip, pre-configuring device.
[   16.320322] Activated ALi 1533 ISA bridge port 0x02e8.
[   16.320339] Activated ALi 1533 ISA bridge port 0x02f8.
[   16.320550] found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
[   16.320585] smsc_superio_flat(): fir: 0x2f8, sir: 0x2e8, dma: 03, irq: 7, mode: 0x0a
[   16.320623] SMsC IrDA Controller found
[   16.320627]  IrCC version 2.0, firport 0x2f8, sirport 0x2e8 dma=3, irq=7
[   16.320844] No transceiver found. Defaulting to Fast pin select
[   16.324729] IrDA: Registered device irda0
[   19.926483] cs: IO port probe 0x100-0x3af: excluding 0x200-0x207 0x220-0x22f 0x330-0x337 0x388-0x38f
[   19.930157] cs: IO port probe 0x3e0-0x4ff: clean.
[   19.931629] cs: IO port probe 0x820-0x8ff: clean.
[   19.933094] cs: IO port probe 0xc00-0xcf7: clean.
[   19.935534] cs: IO port probe 0xa00-0xaff: clean.
[   20.566139] cs: IO port probe 0x100-0x3af: excluding 0x200-0x207 0x220-0x22f 0x330-0x337 0x388-0x38f
[   20.569487] cs: IO port probe 0x3e0-0x4ff: clean.
[   20.571048] cs: IO port probe 0x820-0x8ff: clean.
[   20.572393] cs: IO port probe 0xc00-0xcf7: clean.
[   20.575059] cs: IO port probe 0xa00-0xaff: clean.
[   20.577461] cs: memory probe 0xa0000000-0xa0ffffff: clean.
[   20.590887] pcmcia: registering new device pcmcia0.0
[   20.605373] cs: IO port probe 0x100-0x3af: excluding 0x200-0x207 0x220-0x22f 0x330-0x337 0x388-0x38f
[   20.608703] cs: IO port probe 0x3e0-0x4ff: clean.
[   20.610241] cs: IO port probe 0x820-0x8ff: clean.
[   20.611570] cs: IO port probe 0xc00-0xcf7: clean.
[   20.614126] cs: IO port probe 0xa00-0xaff: clean.
[   21.231647] Marking TSC unstable due to: TSC halts in idle.
[   21.324733] Time: acpi_pm clocksource has been installed.
[   21.578958] Clocksource tsc unstable (delta = -322867937 ns)
[   21.790570] wlags49_h1_cs v7.18 for PCMCIA, 03/31/2004 14:31:00 by Agere Systems, http://www.agere.com
[   21.790597] *** Modified for kernel 2.6 by Andrey Borzenkov <arvidjaar@mail.ru> $Revision: 39 $
[   21.790605] *** Station Mode (STA) Support: YES
[   21.790611] *** Access Point Mode (AP) Support: YES
[   21.836772] eth1: PRI 31 variant 2 version 9.48
[   21.836772] eth1: NIC 5 variant 2 version 1.02
[   21.852013] eth1: Wireless, io_addr 0x100, irq 11, mac_address 00:02:2D:26:95:6C
[   22.483307] Toshiba System Management Mode driver v1.11 26/9/2001
[   22.607162] Non-volatile memory driver v1.2
[   23.615362] device-mapper: uevent: version 1.0.3
[   23.618746] device-mapper: ioctl: 4.13.0-ioctl (2007-10-18) initialised: dm-devel@redhat.com
[   27.663108] Adding 500432k swap on /dev/hda1.  Priority:-1 extents:1 across:500432k
[   28.219423] loop: module loaded
[   41.815792] IrCOMM protocol (Dag Brattli)
[   43.017701] PPP generic driver version 2.4.2
[   51.745765] Bluetooth: Core ver 2.11
[   51.749903] NET: Registered protocol family 31
[   51.749928] Bluetooth: HCI device and connection manager initialized
[   51.750626] Bluetooth: HCI socket layer initialized
[   51.879426] NET: Registered protocol family 17
[   52.196149] Bluetooth: L2CAP ver 2.9
[   52.196185] Bluetooth: L2CAP socket layer initialized
[   52.361060] Bluetooth: RFCOMM socket layer initialized
[   52.362425] Bluetooth: RFCOMM TTY layer initialized
[   52.362449] Bluetooth: RFCOMM ver 1.8
[   54.336846] eth1: PRI 31 variant 2 version 9.48
[   54.336846] eth1: NIC 5 variant 2 version 1.02
[   55.827790] eth1: PRI 31 variant 2 version 9.48
[   55.827790] eth1: NIC 5 variant 2 version 1.02
[   56.041110] eth1: PRI 31 variant 2 version 9.48
[   56.041110] eth1: NIC 5 variant 2 version 1.02
[   63.162469] warning: `ntpd' uses 32-bit capabilities (legacy support in use)
[ 6771.263238] PM: Syncing filesystems ... done.
[ 6771.306778] Freezing user space processes ... (elapsed 0.00 seconds) done.
[ 6771.317193] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
[ 6771.320933] ACPI: Preparing to enter system sleep state S3
[ 6771.322957] Suspending console(s)
[ 6773.467232] serial 00:09: disabled
[ 6773.473857] Trying to free already-free IRQ 11
[ 6773.473871] Pid: 4819, comm: pm-suspend Not tainted 2.6.25-rc2-1avb #2
[ 6773.473885]  [<c0152127>] free_irq+0xb7/0x130
[ 6773.473932]  [<c024bd80>] e100_suspend+0xc0/0x100
[ 6773.473981]  [<c01eaa36>] pci_device_suspend+0x26/0x70
[ 6773.474004]  [<c0243674>] suspend_device+0x94/0xd0
[ 6773.474019]  [<c02439a3>] device_suspend+0x153/0x240
[ 6773.474039]  [<c014314f>] suspend_devices_and_enter+0x4f/0xf0
[ 6773.474065]  [<c0143a5f>] ? freeze_processes+0x3f/0x80
[ 6773.474083]  [<c01432fa>] enter_state+0xaa/0x140
[ 6773.474098]  [<c014341f>] state_store+0x8f/0xd0
[ 6773.474109]  [<c0143390>] ? state_store+0x0/0xd0
[ 6773.474123]  [<c01d3404>] kobj_attr_store+0x24/0x30
[ 6773.474159]  [<c01b547b>] sysfs_write_file+0xbb/0x110
[ 6773.474196]  [<c0177d79>] vfs_write+0x99/0x130
[ 6773.474224]  [<c01b53c0>] ? sysfs_write_file+0x0/0x110
[ 6773.474239]  [<c01782fd>] sys_write+0x3d/0x70
[ 6773.474258]  [<c010409a>] sysenter_past_esp+0x5f/0xa5
[ 6773.474297]  =======================
[ 6773.475189] ACPI: PCI interrupt for device 0000:00:0a.0 disabled
[ 6773.531352] ACPI: PCI interrupt for device 0000:00:06.0 disabled
[ 6773.544526] ACPI: PCI interrupt for device 0000:00:02.0 disabled
[ 6773.562975]  hwsleep-0322 [00] enter_sleep_state     : Entering sleep state [S3]
[ 6773.562975] Back to C!
[ 6773.583911] PCI: Setting latency timer of device 0000:00:01.0 to 64
[ 6773.596830] ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [LNKG] -> GSI 11 (level, low) -> IRQ 11
[ 6773.596879] PM: Writing back config space on device 0000:00:02.0 at offset f (was 500001ff, writing 5000010b)
[ 6773.597101] ACPI: Unable to derive IRQ for device 0000:00:04.0
[ 6773.610384] PM: Writing back config space on device 0000:00:06.0 at offset f (was 180201ff, writing 1802010b)
[ 6773.610498] ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNKH] -> GSI 11 (level, low) -> IRQ 11
[ 6773.910220] PCI: Enabling device 0000:00:08.0 (0000 -> 0001)
[ 6773.923378] PM: Writing back config space on device 0000:00:0a.0 at offset f (was 380801ff, writing 3808010b)
[ 6773.923447] PM: Writing back config space on device 0000:00:0a.0 at offset 1 (was 2900003, writing 2900007)
[ 6773.923576] PM: Writing back config space on device 0000:00:10.0 at offset 6 (was 50200, writing b0050200)
[ 6774.899360] PM: Writing back config space on device 0000:00:12.0 at offset f (was 1ff, writing 10b)
[ 6774.899478] PM: Writing back config space on device 0000:01:00.0 at offset f (was 1ff, writing 10b)
[ 6774.909757] serial 00:09: activated
[ 6775.332194] hda: host max PIO5 wanted PIO255(auto-tune) selected PIO4
[ 6775.332424] hda: UDMA/33 mode selected
[ 6775.344338] hdc: host max PIO5 wanted PIO255(auto-tune) selected PIO4
[ 6775.345526] hdc: UDMA/33 mode selected
[ 6775.399843] usb usb1: root hub lost power or was reset
[ 6775.556713] eth1: PRI 31 variant 2 version 9.48
[ 6775.556713] eth1: NIC 5 variant 2 version 1.02
[ 6775.560089] Restarting tasks ... done.
[ 6781.179680] eth1: PRI 31 variant 2 version 9.48
[ 6781.179680] eth1: NIC 5 variant 2 version 1.02
[ 6781.326338] eth1: PRI 31 variant 2 version 9.48
[ 6781.326338] eth1: NIC 5 variant 2 version 1.02
[ 6781.442997] eth1: PRI 31 variant 2 version 9.48
[ 6781.442997] eth1: NIC 5 variant 2 version 1.02
[ 8737.795758] toshiba_acpi: Toshiba Laptop ACPI Extras version 0.18
[ 8737.795785] toshiba_acpi:     HCI method: \_SB_.VALD.GHCI
[ 8803.781910] PM: Syncing filesystems ... done.
[ 8803.838967] Freezing user space processes ... (elapsed 0.00 seconds) done.
[ 8803.848156] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
[ 8803.850634] ACPI: Preparing to enter system sleep state S3
[ 8803.853141] Suspending console(s)
[ 8805.287505] serial 00:09: disabled
[ 8805.291564] Trying to free already-free IRQ 11
[ 8805.291579] Pid: 6920, comm: pm-suspend Not tainted 2.6.25-rc2-1avb #2
[ 8805.291628]  [<c0152127>] free_irq+0xb7/0x130
[ 8805.291675]  [<c024bd80>] e100_suspend+0xc0/0x100
[ 8805.291724]  [<c01eaa36>] pci_device_suspend+0x26/0x70
[ 8805.291747]  [<c0243674>] suspend_device+0x94/0xd0
[ 8805.291763]  [<c02439a3>] device_suspend+0x153/0x240
[ 8805.291784]  [<c014314f>] suspend_devices_and_enter+0x4f/0xf0
[ 8805.291808]  [<c0143a5f>] ? freeze_processes+0x3f/0x80
[ 8805.291825]  [<c01432fa>] enter_state+0xaa/0x140
[ 8805.291840]  [<c014341f>] state_store+0x8f/0xd0
[ 8805.291852]  [<c0143390>] ? state_store+0x0/0xd0
[ 8805.291866]  [<c01d3404>] kobj_attr_store+0x24/0x30
[ 8805.291901]  [<c01b547b>] sysfs_write_file+0xbb/0x110
[ 8805.291936]  [<c0177d79>] vfs_write+0x99/0x130
[ 8805.291963]  [<c01b53c0>] ? sysfs_write_file+0x0/0x110
[ 8805.291979]  [<c01782fd>] sys_write+0x3d/0x70
[ 8805.291998]  [<c010409a>] sysenter_past_esp+0x5f/0xa5
[ 8805.292038]  =======================
[ 8805.347640] ACPI: PCI interrupt for device 0000:00:06.0 disabled
[ 8805.361128] ACPI: PCI interrupt for device 0000:00:02.0 disabled
[ 8805.376670]  hwsleep-0322 [00] enter_sleep_state     : Entering sleep state [S3]
[ 8805.376670] Back to C!
[ 8805.397476] PCI: Setting latency timer of device 0000:00:01.0 to 64
[ 8805.410564] ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [LNKG] -> GSI 11 (level, low) -> IRQ 11
[ 8805.410613] PM: Writing back config space on device 0000:00:02.0 at offset f (was 500001ff, writing 5000010b)
[ 8805.410836] ACPI: Unable to derive IRQ for device 0000:00:04.0
[ 8805.424228] PM: Writing back config space on device 0000:00:06.0 at offset f (was 180201ff, writing 1802010b)
[ 8805.424343] ACPI: PCI Interrupt 0000:00:06.0[A] -> Link [LNKH] -> GSI 11 (level, low) -> IRQ 11
[ 8805.717374] PCI: Enabling device 0000:00:08.0 (0000 -> 0001)
[ 8805.730528] PM: Writing back config space on device 0000:00:0a.0 at offset f (was 380801ff, writing 3808010b)
[ 8805.730712] PM: Writing back config space on device 0000:00:10.0 at offset 6 (was 50200, writing b0050200)
[ 8806.709907] PM: Writing back config space on device 0000:00:12.0 at offset f (was 1ff, writing 10b)
[ 8806.710025] PM: Writing back config space on device 0000:01:00.0 at offset f (was 1ff, writing 10b)
[ 8806.720272] serial 00:09: activated
[ 8807.138422] hda: host max PIO5 wanted PIO255(auto-tune) selected PIO4
[ 8807.138659] hda: UDMA/33 mode selected
[ 8807.145088] hdc: host max PIO5 wanted PIO255(auto-tune) selected PIO4
[ 8807.145088] hdc: UDMA/33 mode selected
[ 8807.203643] usb usb1: root hub lost power or was reset
[ 8807.360453] eth1: PRI 31 variant 2 version 9.48
[ 8807.360453] eth1: NIC 5 variant 2 version 1.02
[ 8807.367163] Restarting tasks ... done.
[ 8811.193537] eth1: PRI 31 variant 2 version 9.48
[ 8811.193537] eth1: NIC 5 variant 2 version 1.02
[ 8811.333528] eth1: PRI 31 variant 2 version 9.48
[ 8811.333528] eth1: NIC 5 variant 2 version 1.02
[ 8811.446854] eth1: PRI 31 variant 2 version 9.48
[ 8811.446854] eth1: NIC 5 variant 2 version 1.02

[-- Attachment #1.3: config-2.6.25-rc2-1avb --]
[-- Type: text/plain, Size: 54562 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.25-rc2
# Sat Feb 16 19:45:46 2008
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
CONFIG_X86=y
# CONFIG_GENERIC_LOCKBREAK is not set
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_FAST_CMPXCHG_LOCAL=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_QUICKLIST=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
# CONFIG_GENERIC_GPIO is not set
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_DMI=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
# CONFIG_GENERIC_TIME_VSYSCALL is not set
CONFIG_ARCH_HAS_CPU_RELAX=y
# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ZONE_DMA32 is not set
CONFIG_ARCH_POPULATES_NODE_MAP=y
# CONFIG_AUDIT_ARCH is not set
CONFIG_ARCH_SUPPORTS_AOUT=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_KTIME_SCALAR=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
# CONFIG_TASKSTATS is not set
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_TREE=y
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=17
# CONFIG_CGROUPS is not set
CONFIG_GROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_USER_SCHED=y
# CONFIG_CGROUP_SCHED is not set
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_RELAY=y
# CONFIG_NAMESPACES is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SYSCTL=y
CONFIG_EMBEDDED=y
# CONFIG_UID16 is not set
# CONFIG_SYSCTL_SYSCALL is not set
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_COMPAT_BRK=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
CONFIG_PROFILING=y
# CONFIG_MARKERS is not set
CONFIG_OPROFILE=m
CONFIG_HAVE_OPROFILE=y
CONFIG_KPROBES=y
CONFIG_HAVE_KPROBES=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
CONFIG_BLOCK=y
# CONFIG_LBD is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_LSF is not set
# CONFIG_BLK_DEV_BSG is not set

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_CLASSIC_RCU=y
# CONFIG_PREEMPT_RCU is not set

#
# Processor type and features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
# CONFIG_SMP is not set
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_X86_RDC321X is not set
# CONFIG_X86_VSMP is not set
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
# CONFIG_PARAVIRT_GUEST is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
CONFIG_MPENTIUMIII=y
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
# CONFIG_GENERIC_CPU is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_X86_XADD=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=4
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
# CONFIG_IOMMU_HELPER is not set
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_RCU_TRACE=y
# CONFIG_X86_UP_APIC is not set
# CONFIG_X86_MCE is not set
CONFIG_VM86=y
CONFIG_TOSHIBA=m
# CONFIG_I8K is not set
CONFIG_X86_REBOOTFIXUPS=y
CONFIG_MICROCODE=m
CONFIG_MICROCODE_OLD_INTERFACE=y
CONFIG_X86_MSR=m
CONFIG_X86_CPUID=m
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
CONFIG_VMSPLIT_3G=y
# CONFIG_VMSPLIT_3G_OPT is not set
# CONFIG_VMSPLIT_2G is not set
# CONFIG_VMSPLIT_2G_OPT is not set
# CONFIG_VMSPLIT_1G is not set
CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_X86_PAE is not set
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_DISCONTIGMEM_MANUAL is not set
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPARSEMEM_STATIC=y
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_RESOURCES_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_NR_QUICK=1
CONFIG_VIRT_TO_BUS=y
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
# CONFIG_EFI is not set
CONFIG_SECCOMP=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
CONFIG_HZ_300=y
# CONFIG_HZ_1000 is not set
CONFIG_HZ=300
CONFIG_SCHED_HRTICK=y
# CONFIG_KEXEC is not set
CONFIG_PHYSICAL_START=0x100000
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_ALIGN=0x100000
# CONFIG_COMPAT_VDSO is not set

#
# Power management options
#
CONFIG_PM=y
# CONFIG_PM_LEGACY is not set
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION=""
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
# CONFIG_ACPI_PROCFS is not set
# CONFIG_ACPI_PROCFS_POWER is not set
CONFIG_ACPI_SYSFS_POWER=y
# CONFIG_ACPI_PROC_EVENT is not set
CONFIG_ACPI_AC=m
CONFIG_ACPI_BATTERY=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_FAN=m
# CONFIG_ACPI_DOCK is not set
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_THERMAL=m
# CONFIG_ACPI_WMI is not set
# CONFIG_ACPI_ASUS is not set
CONFIG_ACPI_TOSHIBA=m
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_CUSTOM_DSDT_INITRD=y
CONFIG_ACPI_BLACKLIST_YEAR=0
CONFIG_ACPI_DEBUG=y
# CONFIG_ACPI_DEBUG_FUNC_TRACE is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
# CONFIG_ACPI_CONTAINER is not set
# CONFIG_ACPI_SBS is not set
# CONFIG_APM is not set

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=m
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m

#
# CPUFreq processor drivers
#
CONFIG_X86_ACPI_CPUFREQ=m
# CONFIG_X86_POWERNOW_K6 is not set
# CONFIG_X86_POWERNOW_K7 is not set
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_GX_SUSPMOD is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_SPEEDSTEP_ICH is not set
# CONFIG_X86_SPEEDSTEP_SMI is not set
# CONFIG_X86_P4_CLOCKMOD is not set
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
# CONFIG_X86_LONGRUN is not set
# CONFIG_X86_LONGHAUL is not set
# CONFIG_X86_E_POWERSAVER is not set

#
# shared options
#
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
# CONFIG_X86_SPEEDSTEP_LIB is not set
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCI_DOMAINS=y
# CONFIG_PCIEPORTBUS is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
CONFIG_PCI_LEGACY=y
# CONFIG_PCI_DEBUG is not set
CONFIG_ISA_DMA_API=y
CONFIG_ISA=y
# CONFIG_EISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set
CONFIG_PCCARD=m
# CONFIG_PCMCIA_DEBUG is not set
CONFIG_PCMCIA=m
CONFIG_PCMCIA_LOAD_CIS=y
# CONFIG_PCMCIA_IOCTL is not set
CONFIG_CARDBUS=y

#
# PC-card bridges
#
CONFIG_YENTA=m
CONFIG_YENTA_O2=y
CONFIG_YENTA_RICOH=y
CONFIG_YENTA_TI=y
CONFIG_YENTA_ENE_TUNE=y
CONFIG_YENTA_TOSHIBA=y
# CONFIG_PD6729 is not set
# CONFIG_I82092 is not set
# CONFIG_I82365 is not set
# CONFIG_TCIC is not set
CONFIG_PCMCIA_PROBE=y
CONFIG_PCCARD_NONSTATIC=m
# CONFIG_HOTPLUG_PCI is not set

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_AOUT=m
CONFIG_BINFMT_MISC=m

#
# Networking
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=m
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
CONFIG_XFRM=y
CONFIG_XFRM_USER=m
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_XFRM_STATISTICS is not set
CONFIG_NET_KEY=m
# CONFIG_NET_KEY_MIGRATE is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_ASK_IP_FIB_HASH=y
# CONFIG_IP_FIB_TRIE is not set
CONFIG_IP_FIB_HASH=y
CONFIG_IP_MULTIPLE_TABLES=y
# CONFIG_IP_ROUTE_MULTIPATH is not set
# CONFIG_IP_ROUTE_VERBOSE is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not set
# CONFIG_TCP_CONG_ADVANCED is not set
CONFIG_TCP_CONG_CUBIC=y
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_MD5SIG is not set
# CONFIG_IPV6 is not set
# CONFIG_INET6_XFRM_TUNNEL is not set
# CONFIG_INET6_TUNNEL is not set
# CONFIG_NETWORK_SECMARK is not set
# CONFIG_NETFILTER is not set
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_SCHED is not set

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NET_TCPPROBE is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
CONFIG_IRDA=m

#
# IrDA protocols
#
CONFIG_IRLAN=m
CONFIG_IRNET=m
CONFIG_IRCOMM=m
CONFIG_IRDA_ULTRA=y

#
# IrDA options
#
CONFIG_IRDA_CACHE_LAST_LSAP=y
CONFIG_IRDA_FAST_RR=y
# CONFIG_IRDA_DEBUG is not set

#
# Infrared-port device drivers
#

#
# SIR device drivers
#
# CONFIG_IRTTY_SIR is not set

#
# Dongle support
#
# CONFIG_KINGSUN_DONGLE is not set
# CONFIG_KSDAZZLE_DONGLE is not set
# CONFIG_KS959_DONGLE is not set

#
# FIR device drivers
#
# CONFIG_USB_IRDA is not set
# CONFIG_SIGMATEL_FIR is not set
# CONFIG_NSC_FIR is not set
# CONFIG_WINBOND_FIR is not set
# CONFIG_TOSHIBA_FIR is not set
CONFIG_SMC_IRCC_FIR=m
# CONFIG_ALI_FIR is not set
# CONFIG_VLSI_FIR is not set
# CONFIG_VIA_FIR is not set
# CONFIG_MCS_FIR is not set
CONFIG_BT=m
CONFIG_BT_L2CAP=m
# CONFIG_BT_SCO is not set
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=m
# CONFIG_BT_BNEP_MC_FILTER is not set
# CONFIG_BT_BNEP_PROTO_FILTER is not set
# CONFIG_BT_HIDP is not set

#
# Bluetooth device drivers
#
CONFIG_BT_HCIUSB=m
# CONFIG_BT_HCIUSB_SCO is not set
# CONFIG_BT_HCIUART is not set
# CONFIG_BT_HCIBCM203X is not set
# CONFIG_BT_HCIBPA10X is not set
# CONFIG_BT_HCIBFUSB is not set
# CONFIG_BT_HCIDTL1 is not set
# CONFIG_BT_HCIBT3C is not set
# CONFIG_BT_HCIBLUECARD is not set
# CONFIG_BT_HCIBTUART is not set
# CONFIG_BT_HCIVHCI is not set
# CONFIG_AF_RXRPC is not set
CONFIG_FIB_RULES=y

#
# Wireless
#
CONFIG_CFG80211=m
CONFIG_NL80211=y
CONFIG_WIRELESS_EXT=y
# CONFIG_MAC80211 is not set
# CONFIG_IEEE80211 is not set
# CONFIG_RFKILL is not set
# CONFIG_NET_9P is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="\"\""
# CONFIG_STANDALONE is not set
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=m
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
CONFIG_CONNECTOR=m
# CONFIG_MTD is not set
# CONFIG_PARPORT is not set
CONFIG_PNP=y
# CONFIG_PNP_DEBUG is not set

#
# Protocols
#
# CONFIG_ISAPNP is not set
# CONFIG_PNPBIOS is not set
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=32000
# CONFIG_BLK_DEV_XIP is not set
CONFIG_CDROM_PKTCDVD=y
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
# CONFIG_ATA_OVER_ETH is not set
CONFIG_MISC_DEVICES=y
# CONFIG_IBM_ASM is not set
# CONFIG_PHANTOM is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_FUJITSU_LAPTOP is not set
# CONFIG_TC1100_WMI is not set
# CONFIG_MSI_LAPTOP is not set
# CONFIG_SONY_LAPTOP is not set
# CONFIG_THINKPAD_ACPI is not set
# CONFIG_INTEL_MENLOW is not set
# CONFIG_ENCLOSURE_SERVICES is not set
CONFIG_HAVE_IDE=y
CONFIG_IDE=m
CONFIG_IDE_MAX_HWIFS=4
CONFIG_BLK_DEV_IDE=m

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=m
# CONFIG_IDEDISK_MULTI_MODE is not set
# CONFIG_BLK_DEV_IDECS is not set
# CONFIG_BLK_DEV_DELKIN is not set
CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
CONFIG_BLK_DEV_IDEACPI=y
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_PROC_FS=y

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=m
# CONFIG_BLK_DEV_PLATFORM is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_IDEPNP is not set
CONFIG_BLK_DEV_IDEDMA_SFF=y

#
# PCI IDE chipsets support
#
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_BLK_DEV_GENERIC is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_AEC62XX is not set
CONFIG_BLK_DEV_ALI15X3=m
# CONFIG_WDC_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_CS5535 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set

#
# Other IDE chipsets support
#

#
# Note: most of these also require special kernel boot parameters
#
# CONFIG_BLK_DEV_4DRIVES is not set
# CONFIG_BLK_DEV_ALI14XX is not set
# CONFIG_BLK_DEV_DTC2278 is not set
# CONFIG_BLK_DEV_HT6560B is not set
# CONFIG_BLK_DEV_QD65XX is not set
# CONFIG_BLK_DEV_UMC8672 is not set
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDE_ARCH_OBSOLETE_INIT=y
# CONFIG_BLK_DEV_HD is not set

#
# SCSI device support
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=m
CONFIG_SCSI_DMA=y
CONFIG_SCSI_TGT=m
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=m
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=m
# CONFIG_CHR_DEV_SCH is not set

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
# CONFIG_SCSI_SCAN_ASYNC is not set
CONFIG_SCSI_WAIT_SCAN=m

#
# SCSI Transports
#
CONFIG_SCSI_SPI_ATTRS=m
# CONFIG_SCSI_FC_ATTRS is not set
CONFIG_SCSI_ISCSI_ATTRS=m
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_7000FASST is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_PAS16 is not set
# CONFIG_SCSI_QLOGIC_FAS is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_T128 is not set
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_SRP is not set
# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
CONFIG_ATA=m
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_ACPI=y
# CONFIG_SATA_AHCI is not set
# CONFIG_SATA_SVW is not set
# CONFIG_ATA_PIIX is not set
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SX4 is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIL24 is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
# CONFIG_SATA_INIC162X is not set
CONFIG_PATA_ACPI=m
CONFIG_PATA_ALI=m
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CS5535 is not set
# CONFIG_PATA_CS5536 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_LEGACY is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PCMCIA is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_QDI is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RZ1000 is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
# CONFIG_PATA_WINBOND_VLB is not set
# CONFIG_PATA_PLATFORM is not set
CONFIG_MD=y
CONFIG_BLK_DEV_MD=m
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID10=m
CONFIG_MD_RAID456=m
CONFIG_MD_RAID5_RESHAPE=y
CONFIG_MD_MULTIPATH=m
CONFIG_MD_FAULTY=m
CONFIG_BLK_DEV_DM=m
# CONFIG_DM_DEBUG is not set
CONFIG_DM_CRYPT=m
CONFIG_DM_SNAPSHOT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
CONFIG_DM_MULTIPATH=m
CONFIG_DM_MULTIPATH_EMC=m
# CONFIG_DM_MULTIPATH_RDAC is not set
# CONFIG_DM_MULTIPATH_HP is not set
# CONFIG_DM_DELAY is not set
CONFIG_DM_UEVENT=y
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#
# CONFIG_FIREWIRE is not set
# CONFIG_IEEE1394 is not set
# CONFIG_I2O is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
# CONFIG_NETDEVICES_MULTIQUEUE is not set
CONFIG_DUMMY=m
CONFIG_BONDING=m
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
CONFIG_TUN=m
CONFIG_VETH=m
# CONFIG_NET_SB1000 is not set
# CONFIG_ARCNET is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
CONFIG_MII=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_NET_TULIP is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_HP100 is not set
# CONFIG_NET_ISA is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_AC3200 is not set
# CONFIG_APRICOT is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_CS89x0 is not set
# CONFIG_EEPRO100 is not set
CONFIG_E100=y
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_R6040 is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_SC92031 is not set
# CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set

#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
CONFIG_WLAN_80211=y
# CONFIG_PCMCIA_RAYCS is not set
# CONFIG_IPW2100 is not set
# CONFIG_IPW2200 is not set
# CONFIG_LIBERTAS is not set
# CONFIG_AIRO is not set
# CONFIG_HERMES is not set
# CONFIG_ATMEL is not set
# CONFIG_AIRO_CS is not set
# CONFIG_PCMCIA_WL3501 is not set
# CONFIG_PRISM54 is not set
# CONFIG_USB_ZD1201 is not set
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_HOSTAP is not set

#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
# CONFIG_NET_PCMCIA is not set
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
CONFIG_PPP=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_MPPE=m
CONFIG_PPPOE=m
# CONFIG_PPPOL2TP is not set
# CONFIG_SLIP is not set
CONFIG_SLHC=m
# CONFIG_NET_FC is not set
CONFIG_NETCONSOLE=y
# CONFIG_NETCONSOLE_DYNAMIC is not set
CONFIG_NETPOLL=y
# CONFIG_NETPOLL_TRAP is not set
CONFIG_NET_POLL_CONTROLLER=y
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
# CONFIG_INPUT_FF_MEMLESS is not set
# CONFIG_INPUT_POLLDEV is not set

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=m
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=m
# CONFIG_MOUSE_PS2_ALPS is not set
# CONFIG_MOUSE_PS2_LOGIPS2PP is not set
# CONFIG_MOUSE_PS2_SYNAPTICS is not set
# CONFIG_MOUSE_PS2_LIFEBOOK is not set
# CONFIG_MOUSE_PS2_TRACKPOINT is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_INPORT is not set
# CONFIG_MOUSE_LOGIBM is not set
# CONFIG_MOUSE_PC110PAD is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
CONFIG_INPUT_MISC=y
CONFIG_INPUT_PCSPKR=m
# CONFIG_INPUT_APANEL is not set
# CONFIG_INPUT_WISTRON_BTNS is not set
# CONFIG_INPUT_ATLAS_BTNS is not set
# CONFIG_INPUT_ATI_REMOTE is not set
# CONFIG_INPUT_ATI_REMOTE2 is not set
# CONFIG_INPUT_KEYSPAN_REMOTE is not set
# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
CONFIG_INPUT_UINPUT=m

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
CONFIG_SERIO_RAW=m
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_NOZOMI is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=m
CONFIG_FIX_EARLYCON_MEM=y
# CONFIG_SERIAL_8250_PCI is not set
CONFIG_SERIAL_8250_PNP=m
CONFIG_SERIAL_8250_CS=m
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
# CONFIG_SERIAL_8250_MANY_PORTS is not set
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_RSA is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=m
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
# CONFIG_IPMI_HANDLER is not set
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_INTEL=m
# CONFIG_HW_RANDOM_AMD is not set
# CONFIG_HW_RANDOM_GEODE is not set
# CONFIG_HW_RANDOM_VIA is not set
CONFIG_NVRAM=m
# CONFIG_RTC is not set
CONFIG_GEN_RTC=m
CONFIG_GEN_RTC_X=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set

#
# PCMCIA character devices
#
# CONFIG_SYNCLINK_CS is not set
# CONFIG_CARDMAN_4000 is not set
# CONFIG_CARDMAN_4040 is not set
# CONFIG_IPWIRELESS is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not set
# CONFIG_CS5535_GPIO is not set
CONFIG_RAW_DRIVER=m
CONFIG_MAX_RAW_DEVS=256
CONFIG_HPET=y
# CONFIG_HPET_RTC_IRQ is not set
CONFIG_HPET_MMAP=y
CONFIG_HANGCHECK_TIMER=m
# CONFIG_TCG_TPM is not set
# CONFIG_TELCLOCK is not set
CONFIG_DEVPORT=y
CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=m

#
# I2C Algorithms
#
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_ALGOPCF=m
CONFIG_I2C_ALGOPCA=m

#
# I2C Hardware Bus support
#
CONFIG_I2C_ALI1535=m
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_ELEKTOR is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_I810 is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_PROSAVAGE is not set
# CONFIG_I2C_SAVAGE4 is not set
# CONFIG_I2C_SIMTEC is not set
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_TAOS_EVM is not set
CONFIG_I2C_STUB=m
# CONFIG_I2C_TINY_USB is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
# CONFIG_I2C_PCA_ISA is not set

#
# Miscellaneous I2C Chip support
#
# CONFIG_DS1682 is not set
CONFIG_SENSORS_EEPROM=m
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_PCF8575 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_TPS65010 is not set
# CONFIG_SENSORS_MAX6875 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set

#
# SPI support
#
# CONFIG_SPI is not set
# CONFIG_SPI_MASTER is not set
# CONFIG_W1 is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_BATTERY_DS2760 is not set
CONFIG_HWMON=m
# CONFIG_HWMON_VID is not set
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_K8TEMP is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHER is not set
# CONFIG_SENSORS_FSCPOS is not set
# CONFIG_SENSORS_FSCHMD is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_CORETEMP is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
CONFIG_SENSORS_LM90=m
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_SENSORS_APPLESMC is not set
# CONFIG_HWMON_DEBUG_CHIP is not set
CONFIG_THERMAL=y
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set

#
# Watchdog Device Drivers
#
CONFIG_SOFT_WATCHDOG=m
# CONFIG_ACQUIRE_WDT is not set
# CONFIG_ADVANTECH_WDT is not set
CONFIG_ALIM1535_WDT=m
# CONFIG_ALIM7101_WDT is not set
# CONFIG_SC520_WDT is not set
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_IBMASR is not set
# CONFIG_WAFER_WDT is not set
# CONFIG_I6300ESB_WDT is not set
# CONFIG_ITCO_WDT is not set
# CONFIG_IT8712F_WDT is not set
# CONFIG_SC1200_WDT is not set
# CONFIG_PC87413_WDT is not set
# CONFIG_60XX_WDT is not set
# CONFIG_SBC8360_WDT is not set
# CONFIG_SBC7240_WDT is not set
# CONFIG_CPU5_WDT is not set
# CONFIG_SMSC37B787_WDT is not set
# CONFIG_W83627HF_WDT is not set
# CONFIG_W83697HF_WDT is not set
# CONFIG_W83877F_WDT is not set
# CONFIG_W83977F_WDT is not set
# CONFIG_MACHZ_WDT is not set
# CONFIG_SBC_EPX_C3_WATCHDOG is not set

#
# ISA-based Watchdog Cards
#
# CONFIG_PCWATCHDOG is not set
# CONFIG_MIXCOMWD is not set
# CONFIG_WDT is not set

#
# PCI-based Watchdog Cards
#
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_WDTPCI is not set

#
# USB-based Watchdog Cards
#
# CONFIG_USBPCWATCHDOG is not set

#
# Sonics Silicon Backplane
#
CONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
# CONFIG_DVB_CORE is not set
# CONFIG_DAB is not set

#
# Graphics support
#
CONFIG_AGP=m
CONFIG_AGP_ALI=m
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
# CONFIG_AGP_INTEL is not set
# CONFIG_AGP_NVIDIA is not set
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set
# CONFIG_DRM is not set
# CONFIG_VGASTATE is not set
CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_FB=y
CONFIG_FIRMWARE_EDID=y
# CONFIG_FB_DDC is not set
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
# CONFIG_FB_SYS_FILLRECT is not set
# CONFIG_FB_SYS_COPYAREA is not set
# CONFIG_FB_SYS_IMAGEBLIT is not set
# CONFIG_FB_SYS_FOPS is not set
CONFIG_FB_DEFERRED_IO=y
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_MACMODES is not set
# CONFIG_FB_BACKLIGHT is not set
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y

#
# Frame buffer hardware drivers
#
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
CONFIG_FB_UVESA=m
CONFIG_FB_VESA=y
# CONFIG_FB_EFI is not set
# CONFIG_FB_HECUBA is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I810 is not set
# CONFIG_FB_LE80578 is not set
# CONFIG_FB_INTEL is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_CYBLA is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_VIRTUAL is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=m
CONFIG_BACKLIGHT_CLASS_DEVICE=m
# CONFIG_BACKLIGHT_CORGI is not set
# CONFIG_BACKLIGHT_PROGEAR is not set

#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_VIDEO_SELECT=y
# CONFIG_MDA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_7x14 is not set
# CONFIG_FONT_PEARL_8x8 is not set
# CONFIG_FONT_ACORN_8x8 is not set
# CONFIG_FONT_MINI_4x6 is not set
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_CLUT224=y

#
# Sound
#
CONFIG_SOUND=m

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
# CONFIG_SND_DYNAMIC_MINORS is not set
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

#
# Generic devices
#
CONFIG_SND_MPU401_UART=m
CONFIG_SND_AC97_CODEC=m
CONFIG_SND_DUMMY=m
CONFIG_SND_VIRMIDI=m
CONFIG_SND_MTPAV=m
CONFIG_SND_SERIAL_U16550=m
CONFIG_SND_MPU401=m

#
# ISA devices
#
# CONFIG_SND_ADLIB is not set
# CONFIG_SND_AD1816A is not set
# CONFIG_SND_AD1848 is not set
# CONFIG_SND_ALS100 is not set
# CONFIG_SND_AZT2320 is not set
# CONFIG_SND_CMI8330 is not set
# CONFIG_SND_CS4231 is not set
# CONFIG_SND_CS4232 is not set
# CONFIG_SND_CS4236 is not set
# CONFIG_SND_DT019X is not set
# CONFIG_SND_ES968 is not set
# CONFIG_SND_ES1688 is not set
# CONFIG_SND_ES18XX is not set
# CONFIG_SND_SC6000 is not set
# CONFIG_SND_GUSCLASSIC is not set
# CONFIG_SND_GUSEXTREME is not set
# CONFIG_SND_GUSMAX is not set
# CONFIG_SND_INTERWAVE is not set
# CONFIG_SND_INTERWAVE_STB is not set
# CONFIG_SND_OPL3SA2 is not set
# CONFIG_SND_OPTI92X_AD1848 is not set
# CONFIG_SND_OPTI92X_CS4231 is not set
# CONFIG_SND_OPTI93X is not set
# CONFIG_SND_MIRO is not set
# CONFIG_SND_SB8 is not set
# CONFIG_SND_SB16 is not set
# CONFIG_SND_SBAWE is not set
# CONFIG_SND_SGALAXY is not set
# CONFIG_SND_SSCAPE is not set
# CONFIG_SND_WAVEFRONT is not set

#
# PCI devices
#
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS300 is not set
# CONFIG_SND_ALS4000 is not set
CONFIG_SND_ALI5451=m
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_OXYGEN is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS5530 is not set
# CONFIG_SND_CS5535AUDIO is not set
# CONFIG_SND_DARLA20 is not set
# CONFIG_SND_GINA20 is not set
# CONFIG_SND_LAYLA20 is not set
# CONFIG_SND_DARLA24 is not set
# CONFIG_SND_GINA24 is not set
# CONFIG_SND_LAYLA24 is not set
# CONFIG_SND_MONA is not set
# CONFIG_SND_MIA is not set
# CONFIG_SND_ECHO3G is not set
# CONFIG_SND_INDIGO is not set
# CONFIG_SND_INDIGOIO is not set
# CONFIG_SND_INDIGODJ is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_HDA_INTEL is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_HIFIER is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_PCXHR is not set
# CONFIG_SND_RIPTIDE is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_SIS7019 is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VIRTUOSO is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_YMFPCI is not set
CONFIG_SND_AC97_POWER_SAVE=y
CONFIG_SND_AC97_POWER_SAVE_DEFAULT=60

#
# USB devices
#
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_USX2Y is not set
# CONFIG_SND_USB_CAIAQ is not set

#
# PCMCIA devices
#
# CONFIG_SND_VXPOCKET is not set
# CONFIG_SND_PDAUDIOCF is not set

#
# System on Chip audio support
#
# CONFIG_SND_SOC is not set

#
# SoC Audio support for SuperH
#

#
# ALSA SoC audio for Freescale SOCs
#

#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
CONFIG_AC97_BUS=m
CONFIG_HID_SUPPORT=y
CONFIG_HID=m
# CONFIG_HID_DEBUG is not set
# CONFIG_HIDRAW is not set

#
# USB Input Devices
#
CONFIG_USB_HID=m
# CONFIG_USB_HIDINPUT_POWERBOOK is not set
# CONFIG_HID_FF is not set
# CONFIG_USB_HIDDEV is not set

#
# USB HID Boot Protocol drivers
#
CONFIG_USB_KBD=m
CONFIG_USB_MOUSE=m
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=m
# CONFIG_USB_DEBUG is not set
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_SUSPEND=y
CONFIG_USB_PERSIST=y
# CONFIG_USB_OTG is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_EHCI_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
CONFIG_USB_OHCI_HCD=m
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
# CONFIG_USB_UHCI_HCD is not set
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set

#
# USB Device Class drivers
#
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m

#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#

#
# may also be needed; see USB_STORAGE Help for more information
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
CONFIG_USB_STORAGE_DATAFAB=y
CONFIG_USB_STORAGE_FREECOM=y
# CONFIG_USB_STORAGE_ISD200 is not set
CONFIG_USB_STORAGE_DPCM=y
CONFIG_USB_STORAGE_USBAT=y
CONFIG_USB_STORAGE_SDDR09=y
CONFIG_USB_STORAGE_SDDR55=y
CONFIG_USB_STORAGE_JUMPSHOT=y
CONFIG_USB_STORAGE_ALAUDA=y
CONFIG_USB_STORAGE_KARMA=y
# CONFIG_USB_LIBUSUAL is not set

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USB_MON is not set

#
# USB port drivers
#
CONFIG_USB_SERIAL=m
# CONFIG_USB_EZUSB is not set
CONFIG_USB_SERIAL_GENERIC=y
# CONFIG_USB_SERIAL_AIRCABLE is not set
# CONFIG_USB_SERIAL_AIRPRIME is not set
# CONFIG_USB_SERIAL_ARK3116 is not set
# CONFIG_USB_SERIAL_BELKIN is not set
# CONFIG_USB_SERIAL_CH341 is not set
# CONFIG_USB_SERIAL_WHITEHEAT is not set
# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
# CONFIG_USB_SERIAL_CP2101 is not set
# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
# CONFIG_USB_SERIAL_EMPEG is not set
# CONFIG_USB_SERIAL_FTDI_SIO is not set
# CONFIG_USB_SERIAL_FUNSOFT is not set
# CONFIG_USB_SERIAL_VISOR is not set
# CONFIG_USB_SERIAL_IPAQ is not set
# CONFIG_USB_SERIAL_IR is not set
# CONFIG_USB_SERIAL_EDGEPORT is not set
# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
# CONFIG_USB_SERIAL_GARMIN is not set
# CONFIG_USB_SERIAL_IPW is not set
# CONFIG_USB_SERIAL_IUU is not set
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
# CONFIG_USB_SERIAL_KEYSPAN is not set
# CONFIG_USB_SERIAL_KLSI is not set
# CONFIG_USB_SERIAL_KOBIL_SCT is not set
# CONFIG_USB_SERIAL_MCT_U232 is not set
# CONFIG_USB_SERIAL_MOS7720 is not set
# CONFIG_USB_SERIAL_MOS7840 is not set
# CONFIG_USB_SERIAL_NAVMAN is not set
CONFIG_USB_SERIAL_PL2303=m
# CONFIG_USB_SERIAL_OTI6858 is not set
# CONFIG_USB_SERIAL_HP4X is not set
# CONFIG_USB_SERIAL_SAFE is not set
# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
# CONFIG_USB_SERIAL_TI is not set
# CONFIG_USB_SERIAL_CYBERJACK is not set
# CONFIG_USB_SERIAL_XIRCOM is not set
# CONFIG_USB_SERIAL_OPTION is not set
# CONFIG_USB_SERIAL_OMNINET is not set
# CONFIG_USB_SERIAL_DEBUG is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_BERRY_CHARGE is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_PHIDGET is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_GADGET is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
# CONFIG_NEW_LEDS is not set
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
CONFIG_RTC_LIB=m
CONFIG_RTC_CLASS=m

#
# Conflicting RTC option has been selected, check GEN_RTC and RTC
#

#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
# CONFIG_RTC_INTF_PROC is not set
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set

#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set

#
# SPI RTC drivers
#

#
# Platform RTC drivers
#
CONFIG_RTC_DRV_CMOS=m
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_V3020 is not set

#
# on-CPU RTC drivers
#
# CONFIG_DMADEVICES is not set

#
# Userspace I/O
#
# CONFIG_UIO is not set

#
# Firmware Drivers
#
CONFIG_EDD=y
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
CONFIG_DMIID=y

#
# File systems
#
CONFIG_EXT2_FS=m
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=m
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
# CONFIG_EXT4DEV_FS is not set
CONFIG_JBD=m
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=m
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
CONFIG_REISERFS_PROC_INFO=y
CONFIG_REISERFS_FS_XATTR=y
CONFIG_REISERFS_FS_POSIX_ACL=y
CONFIG_REISERFS_FS_SECURITY=y
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
CONFIG_GENERIC_ACL=y

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=866
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_CONFIGFS_FS=m

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_ECRYPT_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
CONFIG_SQUASHFS=m
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
# CONFIG_SQUASHFS_VMALLOC is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_DIRECTIO=y
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFSD_TCP=y
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=m
CONFIG_SUNRPC_GSS=m
# CONFIG_SUNRPC_BIND34 is not set
CONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_RPCSEC_GSS_SPKM3 is not set
# CONFIG_SMB_FS is not set
CONFIG_CIFS=m
CONFIG_CIFS_STATS=y
CONFIG_CIFS_STATS2=y
# CONFIG_CIFS_WEAK_PW_HASH is not set
# CONFIG_CIFS_XATTR is not set
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_EXPERIMENTAL is not set
# CONFIG_NCP_FS is not set
CONFIG_CODA_FS=m
# CONFIG_CODA_FS_OLD_API is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_BSD_DISKLABEL=y
# CONFIG_MINIX_SUBPARTITION is not set
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
CONFIG_LDM_PARTITION=y
# CONFIG_LDM_DEBUG is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
# CONFIG_EFI_PARTITION is not set
# CONFIG_SYSV68_PARTITION is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=m
# CONFIG_NLS_CODEPAGE_737 is not set
CONFIG_NLS_CODEPAGE_775=m
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
CONFIG_NLS_CODEPAGE_855=m
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
CONFIG_NLS_CODEPAGE_866=m
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
CONFIG_NLS_CODEPAGE_1251=m
CONFIG_NLS_ASCII=m
CONFIG_NLS_ISO8859_1=m
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
CONFIG_NLS_ISO8859_5=m
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=m
# CONFIG_DLM is not set

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_PRINTK_TIME=y
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_UNUSED_SYMBOLS is not set
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_SHIRQ=y
CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_PROVE_LOCKING=y
CONFIG_LOCKDEP=y
CONFIG_LOCK_STAT=y
# CONFIG_DEBUG_LOCKDEP is not set
CONFIG_TRACE_IRQFLAGS=y
CONFIG_DEBUG_SPINLOCK_SLEEP=y
CONFIG_DEBUG_LOCKING_API_SELFTESTS=y
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set
CONFIG_FRAME_POINTER=y
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_KPROBES_SANITY_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_LKDTM is not set
# CONFIG_FAULT_INJECTION is not set
CONFIG_LATENCYTOP=y
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_SAMPLES is not set
# CONFIG_EARLY_PRINTK is not set
CONFIG_DEBUG_STACKOVERFLOW=y
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_DEBUG_RODATA=y
# CONFIG_DEBUG_RODATA_TEST is not set
# CONFIG_DEBUG_NX_TEST is not set
# CONFIG_4KSTACKS is not set
CONFIG_DOUBLEFAULT=y
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
# CONFIG_IO_DELAY_0X80 is not set
CONFIG_IO_DELAY_0XED=y
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEFAULT_IO_DELAY_TYPE=1
# CONFIG_DEBUG_BOOT_PARAMS is not set
# CONFIG_CPA_DEBUG is not set

#
# Security options
#
CONFIG_KEYS=y
CONFIG_KEYS_DEBUG_PROC_KEYS=y
# CONFIG_SECURITY is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_XOR_BLOCKS=m
CONFIG_ASYNC_CORE=m
CONFIG_ASYNC_MEMCPY=m
CONFIG_ASYNC_XOR=m
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=m
CONFIG_CRYPTO_AEAD=m
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_SEQIV=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_MANAGER=m
CONFIG_CRYPTO_HMAC=m
CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_NULL=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=m
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_TGR192=m
CONFIG_CRYPTO_GF128MUL=m
CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_XTS=m
CONFIG_CRYPTO_CTR=m
CONFIG_CRYPTO_GCM=m
CONFIG_CRYPTO_CCM=m
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_DES=m
CONFIG_CRYPTO_FCRYPT=m
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_TWOFISH_COMMON=m
CONFIG_CRYPTO_TWOFISH_586=m
CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_AES_586=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_SEED=m
CONFIG_CRYPTO_SALSA20=m
CONFIG_CRYPTO_SALSA20_586=m
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_TEST=m
CONFIG_CRYPTO_AUTHENC=m
CONFIG_CRYPTO_LZO=m
# CONFIG_CRYPTO_HW is not set
CONFIG_HAVE_KVM=y
# CONFIG_VIRTUALIZATION is not set

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_CRC_CCITT=m
CONFIG_CRC16=m
# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
CONFIG_CRC7=m
CONFIG_LIBCRC32C=m
CONFIG_AUDIT_GENERIC=y
CONFIG_ZLIB_INFLATE=m
CONFIG_ZLIB_DEFLATE=m
CONFIG_LZO_COMPRESS=m
CONFIG_LZO_DECOMPRESS=m
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply

* [PATCH] [resend] 3c509: convert to isa_driver and pnp_driver v5
From: Ondrej Zary @ 2008-02-17 11:02 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, Linux Kernel, Andrew Morton
In-Reply-To: <47A4D791.3050700@garzik.org>

Hello,
this patch converts 3c509 driver to isa_driver and pnp_driver. The result is 
that autoloading using udev and hibernation works with ISA PnP cards. It also 
adds hibernation support for non-PnP ISA cards.

xcvr module parameter was removed as its value was not used.

Tested using 3 ISA cards in various combinations of PnP and non-PnP modes. 
EISA and MCA only compile-tested.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

--- linux-2.6.24-orig/drivers/net/3c509.c	2008-01-27 19:48:19.000000000 +0100
+++ linux-2.6.24-pentium/drivers/net/3c509.c	2008-02-10 21:52:04.000000000 +0100
@@ -54,25 +54,24 @@
 		v1.19a 28Oct2002 Davud Ruggiero <jdr@farfalle.com>
 			- Increase *read_eeprom udelay to workaround oops with 2 cards.
 		v1.19b 08Nov2002 Marc Zyngier <maz@wild-wind.fr.eu.org>
-		    - Introduce driver model for EISA cards.
+			- Introduce driver model for EISA cards.
+		v1.20  04Feb2008 Ondrej Zary <linux@rainbow-software.org>
+			- convert to isa_driver and pnp_driver and some cleanups
 */
 
 #define DRV_NAME	"3c509"
-#define DRV_VERSION	"1.19b"
-#define DRV_RELDATE	"08Nov2002"
+#define DRV_VERSION	"1.20"
+#define DRV_RELDATE	"04Feb2008"
 
 /* A few values that may be tweaked. */
 
 /* Time in jiffies before concluding the transmitter is hung. */
 #define TX_TIMEOUT  (400*HZ/1000)
-/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
-static int max_interrupt_work = 10;
 
 #include <linux/module.h>
-#ifdef CONFIG_MCA
 #include <linux/mca.h>
-#endif
-#include <linux/isapnp.h>
+#include <linux/isa.h>
+#include <linux/pnp.h>
 #include <linux/string.h>
 #include <linux/interrupt.h>
 #include <linux/errno.h>
@@ -97,10 +96,6 @@
 
 static char version[] __initdata = DRV_NAME ".c:" DRV_VERSION " " DRV_RELDATE " becker@scyld.com\n";
 
-#if defined(CONFIG_PM) && (defined(CONFIG_MCA) || defined(CONFIG_EISA))
-#define EL3_SUSPEND
-#endif
-
 #ifdef EL3_DEBUG
 static int el3_debug = EL3_DEBUG;
 #else
@@ -111,6 +106,7 @@
  * a global variable so that the mca/eisa probe routines can increment
  * it */
 static int el3_cards = 0;
+#define EL3_MAX_CARDS 8
 
 /* To minimize the size of the driver source I only define operating
    constants if they are used several times.  You'll need the manual
@@ -119,7 +115,7 @@
 #define EL3_DATA 0x00
 #define EL3_CMD 0x0e
 #define EL3_STATUS 0x0e
-#define	 EEPROM_READ 0x80
+#define	EEPROM_READ 0x80
 
 #define EL3_IO_EXTENT	16
 
@@ -168,23 +164,31 @@
  */
 #define SKB_QUEUE_SIZE	64
 
+enum el3_cardtype { EL3_ISA, EL3_PNP, EL3_MCA, EL3_EISA };
+
 struct el3_private {
 	struct net_device_stats stats;
-	struct net_device *next_dev;
 	spinlock_t lock;
 	/* skb send-queue */
 	int head, size;
 	struct sk_buff *queue[SKB_QUEUE_SIZE];
-	enum {
-		EL3_MCA,
-		EL3_PNP,
-		EL3_EISA,
-	} type;						/* type of device */
-	struct device *dev;
+	enum el3_cardtype type;
 };
-static int id_port __initdata = 0x110;	/* Start with 0x110 to avoid new sound cards.*/
-static struct net_device *el3_root_dev;
+static int id_port;
+static int current_tag;
+static struct net_device *el3_devs[EL3_MAX_CARDS];
+
+/* Parameters that may be passed into the module. */
+static int debug = -1;
+static int irq[] = {-1, -1, -1, -1, -1, -1, -1, -1};
+/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
+static int max_interrupt_work = 10;
+#ifdef CONFIG_PNP
+static int nopnp;
+#endif
 
+static int __init el3_common_init(struct net_device *dev);
+static void el3_common_remove(struct net_device *dev);
 static ushort id_read_eeprom(int index);
 static ushort read_eeprom(int ioaddr, int index);
 static int el3_open(struct net_device *dev);
@@ -199,23 +203,279 @@
 static void el3_down(struct net_device *dev);
 static void el3_up(struct net_device *dev);
 static const struct ethtool_ops ethtool_ops;
-#ifdef EL3_SUSPEND
+#ifdef CONFIG_PM
 static int el3_suspend(struct device *, pm_message_t);
 static int el3_resume(struct device *);
-#else
-#define el3_suspend NULL
-#define el3_resume NULL
 #endif
 
 
 /* generic device remove for all device types */
-#if defined(CONFIG_EISA) || defined(CONFIG_MCA)
 static int el3_device_remove (struct device *device);
-#endif
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void el3_poll_controller(struct net_device *dev);
 #endif
 
+/* Return 0 on success, 1 on error, 2 when found already detected PnP card */
+static int el3_isa_id_sequence(__be16 *phys_addr)
+{
+	short lrs_state = 0xff;
+	int i;
+
+	/* ISA boards are detected by sending the ID sequence to the
+	   ID_PORT.  We find cards past the first by setting the 'current_tag'
+	   on cards as they are found.  Cards with their tag set will not
+	   respond to subsequent ID sequences. */
+
+	outb(0x00, id_port);
+	outb(0x00, id_port);
+	for (i = 0; i < 255; i++) {
+		outb(lrs_state, id_port);
+		lrs_state <<= 1;
+		lrs_state = lrs_state & 0x100 ? lrs_state ^ 0xcf : lrs_state;
+	}
+	/* For the first probe, clear all board's tag registers. */
+	if (current_tag == 0)
+		outb(0xd0, id_port);
+	else			/* Otherwise kill off already-found boards. */
+		outb(0xd8, id_port);
+	if (id_read_eeprom(7) != 0x6d50)
+		return 1;
+	/* Read in EEPROM data, which does contention-select.
+	   Only the lowest address board will stay "on-line".
+	   3Com got the byte order backwards. */
+	for (i = 0; i < 3; i++)
+		phys_addr[i] = htons(id_read_eeprom(i));
+#ifdef CONFIG_PNP
+	if (!nopnp) {
+		/* The ISA PnP 3c509 cards respond to the ID sequence too.
+		   This check is needed in order not to register them twice. */
+		for (i = 0; i < el3_cards; i++) {
+			struct el3_private *lp = netdev_priv(el3_devs[i]);
+			if (lp->type == EL3_PNP
+			    && !memcmp(phys_addr, el3_devs[i]->dev_addr,
+				       ETH_ALEN)) {
+				if (el3_debug > 3)
+					printk(KERN_DEBUG "3c509 with address %02x %02x %02x %02x %02x %02x was found by ISAPnP\n",
+						phys_addr[0] & 0xff, phys_addr[0] >> 8,
+						phys_addr[1] & 0xff, phys_addr[1] >> 8,
+						phys_addr[2] & 0xff, phys_addr[2] >> 8);
+				/* Set the adaptor tag so that the next card can be found. */
+				outb(0xd0 + ++current_tag, id_port);
+				return 2;
+			}
+		}
+	}
+#endif /* CONFIG_PNP */
+	return 0;
+
+}
+
+static void __devinit el3_dev_fill(struct net_device *dev, __be16 *phys_addr,
+				   int ioaddr, int irq, int if_port,
+				   enum el3_cardtype type)
+{
+	struct el3_private *lp = netdev_priv(dev);
+
+	memcpy(dev->dev_addr, phys_addr, ETH_ALEN);
+	dev->base_addr = ioaddr;
+	dev->irq = irq;
+	dev->if_port = if_port;
+	lp->type = type;
+}
+
+static int __devinit el3_isa_match(struct device *pdev,
+				   unsigned int ndev)
+{
+	struct net_device *dev;
+	int ioaddr, isa_irq, if_port, err;
+	unsigned int iobase;
+	__be16 phys_addr[3];
+
+	while ((err = el3_isa_id_sequence(phys_addr)) == 2)
+		;	/* Skip to next card when PnP card found */
+	if (err == 1)
+		return 0;
+
+	iobase = id_read_eeprom(8);
+	if_port = iobase >> 14;
+	ioaddr = 0x200 + ((iobase & 0x1f) << 4);
+	if (irq[el3_cards] > 1 && irq[el3_cards] < 16)
+		isa_irq = irq[el3_cards];
+	else
+		isa_irq = id_read_eeprom(9) >> 12;
+
+	dev = alloc_etherdev(sizeof(struct el3_private));
+	if (!dev)
+		return -ENOMEM;
+
+	netdev_boot_setup_check(dev);
+
+	if (!request_region(ioaddr, EL3_IO_EXTENT, "3c509-isa")) {
+		free_netdev(dev);
+		return 0;
+	}
+
+	/* Set the adaptor tag so that the next card can be found. */
+	outb(0xd0 + ++current_tag, id_port);
+
+	/* Activate the adaptor at the EEPROM location. */
+	outb((ioaddr >> 4) | 0xe0, id_port);
+
+	EL3WINDOW(0);
+	if (inw(ioaddr) != 0x6d50) {
+		free_netdev(dev);
+		return 0;
+	}
+
+	/* Free the interrupt so that some other card can use it. */
+	outw(0x0f00, ioaddr + WN0_IRQ);
+
+	el3_dev_fill(dev, phys_addr, ioaddr, isa_irq, if_port, EL3_ISA);
+	dev_set_drvdata(pdev, dev);
+	if (el3_common_init(dev)) {
+		free_netdev(dev);
+		return 0;
+	}
+
+	el3_devs[el3_cards++] = dev;
+	return 1;
+}
+
+static int __devexit el3_isa_remove(struct device *pdev,
+				    unsigned int ndev)
+{
+	el3_device_remove(pdev);
+	dev_set_drvdata(pdev, NULL);
+	return 0;
+}
+
+#ifdef CONFIG_PM
+static int el3_isa_suspend(struct device *dev, unsigned int n,
+			   pm_message_t state)
+{
+	current_tag = 0;
+	return el3_suspend(dev, state);
+}
+
+static int el3_isa_resume(struct device *dev, unsigned int n)
+{
+	struct net_device *ndev = dev_get_drvdata(dev);
+	int ioaddr = ndev->base_addr, err;
+	__be16 phys_addr[3];
+
+	while ((err = el3_isa_id_sequence(phys_addr)) == 2)
+		;	/* Skip to next card when PnP card found */
+	if (err == 1)
+		return 0;
+	/* Set the adaptor tag so that the next card can be found. */
+	outb(0xd0 + ++current_tag, id_port);
+	/* Enable the card */
+	outb((ioaddr >> 4) | 0xe0, id_port);
+	EL3WINDOW(0);
+	if (inw(ioaddr) != 0x6d50)
+		return 1;
+	/* Free the interrupt so that some other card can use it. */
+	outw(0x0f00, ioaddr + WN0_IRQ);
+	return el3_resume(dev);
+}
+#endif
+
+static struct isa_driver el3_isa_driver = {
+	.match		= el3_isa_match,
+	.remove		= __devexit_p(el3_isa_remove),
+#ifdef CONFIG_PM
+	.suspend	= el3_isa_suspend,
+	.resume		= el3_isa_resume,
+#endif
+	.driver		= {
+		.name	= "3c509"
+	},
+};
+static int isa_registered;
+
+#ifdef CONFIG_PNP
+static struct pnp_device_id el3_pnp_ids[] = {
+	{ .id = "TCM5090" }, /* 3Com Etherlink III (TP) */
+	{ .id = "TCM5091" }, /* 3Com Etherlink III */
+	{ .id = "TCM5094" }, /* 3Com Etherlink III (combo) */
+	{ .id = "TCM5095" }, /* 3Com Etherlink III (TPO) */
+	{ .id = "TCM5098" }, /* 3Com Etherlink III (TPC) */
+	{ .id = "PNP80f7" }, /* 3Com Etherlink III compatible */
+	{ .id = "PNP80f8" }, /* 3Com Etherlink III compatible */
+	{ .id = "" }
+};
+MODULE_DEVICE_TABLE(pnp, el3_pnp_ids);
+
+static int __devinit el3_pnp_probe(struct pnp_dev *pdev,
+				    const struct pnp_device_id *id)
+{
+	short i;
+	int ioaddr, irq, if_port;
+	u16 phys_addr[3];
+	struct net_device *dev = NULL;
+	int err;
+
+	ioaddr = pnp_port_start(pdev, 0);
+	if (!request_region(ioaddr, EL3_IO_EXTENT, "3c509-pnp"))
+		return -EBUSY;
+	irq = pnp_irq(pdev, 0);
+	EL3WINDOW(0);
+	for (i = 0; i < 3; i++)
+		phys_addr[i] = htons(read_eeprom(ioaddr, i));
+	if_port = read_eeprom(ioaddr, 8) >> 14;
+	dev = alloc_etherdev(sizeof(struct el3_private));
+	if (!dev) {
+		release_region(ioaddr, EL3_IO_EXTENT);
+		return -ENOMEM;
+	}
+	SET_NETDEV_DEV(dev, &pdev->dev);
+	netdev_boot_setup_check(dev);
+
+	el3_dev_fill(dev, phys_addr, ioaddr, irq, if_port, EL3_PNP);
+	pnp_set_drvdata(pdev, dev);
+	err = el3_common_init(dev);
+
+	if (err) {
+		pnp_set_drvdata(pdev, NULL);
+		free_netdev(dev);
+		return err;
+	}
+
+	el3_devs[el3_cards++] = dev;
+	return 0;
+}
+
+static void __devexit el3_pnp_remove(struct pnp_dev *pdev)
+{
+	el3_common_remove(pnp_get_drvdata(pdev));
+	pnp_set_drvdata(pdev, NULL);
+}
+
+#ifdef CONFIG_PM
+static int el3_pnp_suspend(struct pnp_dev *pdev, pm_message_t state)
+{
+	return el3_suspend(&pdev->dev, state);
+}
+
+static int el3_pnp_resume(struct pnp_dev *pdev)
+{
+	return el3_resume(&pdev->dev);
+}
+#endif
+
+static struct pnp_driver el3_pnp_driver = {
+	.name		= "3c509",
+	.id_table	= el3_pnp_ids,
+	.probe		= el3_pnp_probe,
+	.remove		= __devexit_p(el3_pnp_remove),
+#ifdef CONFIG_PM
+	.suspend	= el3_pnp_suspend,
+	.resume		= el3_pnp_resume,
+#endif
+};
+static int pnp_registered;
+#endif /* CONFIG_PNP */
+
 #ifdef CONFIG_EISA
 static struct eisa_device_id el3_eisa_ids[] = {
 		{ "TCM5092" },
@@ -230,13 +490,14 @@
 static struct eisa_driver el3_eisa_driver = {
 		.id_table = el3_eisa_ids,
 		.driver   = {
-				.name    = "3c509",
+				.name    = "3c579",
 				.probe   = el3_eisa_probe,
 				.remove  = __devexit_p (el3_device_remove),
 				.suspend = el3_suspend,
 				.resume  = el3_resume,
 		}
 };
+static int eisa_registered;
 #endif
 
 #ifdef CONFIG_MCA
@@ -271,45 +532,9 @@
 				.resume  = el3_resume,
 		},
 };
+static int mca_registered;
 #endif /* CONFIG_MCA */
 
-#if defined(__ISAPNP__)
-static struct isapnp_device_id el3_isapnp_adapters[] __initdata = {
-	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-		ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5090),
-		(long) "3Com Etherlink III (TP)" },
-	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-		ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5091),
-		(long) "3Com Etherlink III" },
-	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-		ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5094),
-		(long) "3Com Etherlink III (combo)" },
-	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-		ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5095),
-		(long) "3Com Etherlink III (TPO)" },
-	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-		ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5098),
-		(long) "3Com Etherlink III (TPC)" },
-	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-		ISAPNP_VENDOR('P', 'N', 'P'), ISAPNP_FUNCTION(0x80f7),
-		(long) "3Com Etherlink III compatible" },
-	{	ISAPNP_ANY_ID, ISAPNP_ANY_ID,
-		ISAPNP_VENDOR('P', 'N', 'P'), ISAPNP_FUNCTION(0x80f8),
-		(long) "3Com Etherlink III compatible" },
-	{ }	/* terminate list */
-};
-
-static __be16 el3_isapnp_phys_addr[8][3];
-static int nopnp;
-#endif /* __ISAPNP__ */
-
-/* With the driver model introduction for EISA devices, both init
- * and cleanup have been split :
- * - EISA devices probe/remove starts in el3_eisa_probe/el3_device_remove
- * - MCA/ISA still use el3_probe
- *
- * Both call el3_common_init/el3_common_remove. */
-
 static int __init el3_common_init(struct net_device *dev)
 {
 	struct el3_private *lp = netdev_priv(dev);
@@ -360,231 +585,11 @@
 
 static void el3_common_remove (struct net_device *dev)
 {
-	struct el3_private *lp = netdev_priv(dev);
-
-	(void) lp;				/* Keep gcc quiet... */
-#if defined(__ISAPNP__)
-	if (lp->type == EL3_PNP)
-		pnp_device_detach(to_pnp_dev(lp->dev));
-#endif
-
 	unregister_netdev (dev);
 	release_region(dev->base_addr, EL3_IO_EXTENT);
 	free_netdev (dev);
 }
 
-static int __init el3_probe(int card_idx)
-{
-	struct net_device *dev;
-	struct el3_private *lp;
-	short lrs_state = 0xff, i;
-	int ioaddr, irq, if_port;
-	__be16 phys_addr[3];
-	static int current_tag;
-	int err = -ENODEV;
-#if defined(__ISAPNP__)
-	static int pnp_cards;
-	struct pnp_dev *idev = NULL;
-	int pnp_found = 0;
-
-	if (nopnp == 1)
-		goto no_pnp;
-
-	for (i=0; el3_isapnp_adapters[i].vendor != 0; i++) {
-		int j;
-		while ((idev = pnp_find_dev(NULL,
-					    el3_isapnp_adapters[i].vendor,
-					    el3_isapnp_adapters[i].function,
-					    idev))) {
-			if (pnp_device_attach(idev) < 0)
-				continue;
-			if (pnp_activate_dev(idev) < 0) {
-__again:
-				pnp_device_detach(idev);
-				continue;
-			}
-			if (!pnp_port_valid(idev, 0) || !pnp_irq_valid(idev, 0))
-				goto __again;
-			ioaddr = pnp_port_start(idev, 0);
-			if (!request_region(ioaddr, EL3_IO_EXTENT, "3c509 PnP")) {
-				pnp_device_detach(idev);
-				return -EBUSY;
-			}
-			irq = pnp_irq(idev, 0);
-			if (el3_debug > 3)
-				printk ("ISAPnP reports %s at i/o 0x%x, irq %d\n",
-					(char*) el3_isapnp_adapters[i].driver_data, ioaddr, irq);
-			EL3WINDOW(0);
-			for (j = 0; j < 3; j++)
-				el3_isapnp_phys_addr[pnp_cards][j] =
-					phys_addr[j] =
-						htons(read_eeprom(ioaddr, j));
-			if_port = read_eeprom(ioaddr, 8) >> 14;
-			dev = alloc_etherdev(sizeof (struct el3_private));
-			if (!dev) {
-					release_region(ioaddr, EL3_IO_EXTENT);
-					pnp_device_detach(idev);
-					return -ENOMEM;
-			}
-
-			SET_NETDEV_DEV(dev, &idev->dev);
-			pnp_cards++;
-
-			netdev_boot_setup_check(dev);
-			pnp_found = 1;
-			goto found;
-		}
-	}
-no_pnp:
-#endif /* __ISAPNP__ */
-
-	/* Select an open I/O location at 0x1*0 to do contention select. */
-	for ( ; id_port < 0x200; id_port += 0x10) {
-		if (!request_region(id_port, 1, "3c509"))
-			continue;
-		outb(0x00, id_port);
-		outb(0xff, id_port);
-		if (inb(id_port) & 0x01){
-			release_region(id_port, 1);
-			break;
-		} else
-			release_region(id_port, 1);
-	}
-	if (id_port >= 0x200) {
-		/* Rare -- do we really need a warning? */
-		printk(" WARNING: No I/O port available for 3c509 activation.\n");
-		return -ENODEV;
-	}
-
-	/* Next check for all ISA bus boards by sending the ID sequence to the
-	   ID_PORT.  We find cards past the first by setting the 'current_tag'
-	   on cards as they are found.  Cards with their tag set will not
-	   respond to subsequent ID sequences. */
-
-	outb(0x00, id_port);
-	outb(0x00, id_port);
-	for(i = 0; i < 255; i++) {
-		outb(lrs_state, id_port);
-		lrs_state <<= 1;
-		lrs_state = lrs_state & 0x100 ? lrs_state ^ 0xcf : lrs_state;
-	}
-
-	/* For the first probe, clear all board's tag registers. */
-	if (current_tag == 0)
-		outb(0xd0, id_port);
-	else				/* Otherwise kill off already-found boards. */
-		outb(0xd8, id_port);
-
-	if (id_read_eeprom(7) != 0x6d50) {
-		return -ENODEV;
-	}
-
-	/* Read in EEPROM data, which does contention-select.
-	   Only the lowest address board will stay "on-line".
-	   3Com got the byte order backwards. */
-	for (i = 0; i < 3; i++) {
-		phys_addr[i] = htons(id_read_eeprom(i));
-	}
-
-#if defined(__ISAPNP__)
-	if (nopnp == 0) {
-		/* The ISA PnP 3c509 cards respond to the ID sequence.
-		   This check is needed in order not to register them twice. */
-		for (i = 0; i < pnp_cards; i++) {
-			if (phys_addr[0] == el3_isapnp_phys_addr[i][0] &&
-			    phys_addr[1] == el3_isapnp_phys_addr[i][1] &&
-			    phys_addr[2] == el3_isapnp_phys_addr[i][2])
-			{
-				if (el3_debug > 3)
-					printk("3c509 with address %02x %02x %02x %02x %02x %02x was found by ISAPnP\n",
-						phys_addr[0] & 0xff, phys_addr[0] >> 8,
-						phys_addr[1] & 0xff, phys_addr[1] >> 8,
-						phys_addr[2] & 0xff, phys_addr[2] >> 8);
-				/* Set the adaptor tag so that the next card can be found. */
-				outb(0xd0 + ++current_tag, id_port);
-				goto no_pnp;
-			}
-		}
-	}
-#endif /* __ISAPNP__ */
-
-	{
-		unsigned int iobase = id_read_eeprom(8);
-		if_port = iobase >> 14;
-		ioaddr = 0x200 + ((iobase & 0x1f) << 4);
-	}
-	irq = id_read_eeprom(9) >> 12;
-
-	dev = alloc_etherdev(sizeof (struct el3_private));
-	if (!dev)
-		return -ENOMEM;
-
-	netdev_boot_setup_check(dev);
-
-	/* Set passed-in IRQ or I/O Addr. */
-	if (dev->irq > 1  &&  dev->irq < 16)
-			irq = dev->irq;
-
-	if (dev->base_addr) {
-		if (dev->mem_end == 0x3c509 	/* Magic key */
-		    && dev->base_addr >= 0x200  &&  dev->base_addr <= 0x3e0)
-			ioaddr = dev->base_addr & 0x3f0;
-		else if (dev->base_addr != ioaddr)
-			goto out;
-	}
-
-	if (!request_region(ioaddr, EL3_IO_EXTENT, "3c509")) {
-		err = -EBUSY;
-		goto out;
-	}
-
-	/* Set the adaptor tag so that the next card can be found. */
-	outb(0xd0 + ++current_tag, id_port);
-
-	/* Activate the adaptor at the EEPROM location. */
-	outb((ioaddr >> 4) | 0xe0, id_port);
-
-	EL3WINDOW(0);
-	if (inw(ioaddr) != 0x6d50)
-		goto out1;
-
-	/* Free the interrupt so that some other card can use it. */
-	outw(0x0f00, ioaddr + WN0_IRQ);
-
-#if defined(__ISAPNP__)
- found:							/* PNP jumps here... */
-#endif /* __ISAPNP__ */
-
-	memcpy(dev->dev_addr, phys_addr, sizeof(phys_addr));
-	dev->base_addr = ioaddr;
-	dev->irq = irq;
-	dev->if_port = if_port;
-	lp = netdev_priv(dev);
-#if defined(__ISAPNP__)
-	lp->dev = &idev->dev;
-	if (pnp_found)
-		lp->type = EL3_PNP;
-#endif
-	err = el3_common_init(dev);
-
-	if (err)
-		goto out1;
-
-	el3_cards++;
-	lp->next_dev = el3_root_dev;
-	el3_root_dev = dev;
-	return 0;
-
-out1:
-#if defined(__ISAPNP__)
-	if (idev)
-		pnp_device_detach(idev);
-#endif
-out:
-	free_netdev(dev);
-	return err;
-}
-
 #ifdef CONFIG_MCA
 static int __init el3_mca_probe(struct device *device)
 {
@@ -596,7 +601,6 @@
 	 * redone for multi-card detection by ZP Gu (zpg@castle.net)
 	 * now works as a module */
 
-	struct el3_private *lp;
 	short i;
 	int ioaddr, irq, if_port;
 	u16 phys_addr[3];
@@ -613,7 +617,7 @@
 	irq = pos5 & 0x0f;
 
 
-	printk("3c529: found %s at slot %d\n",
+	printk(KERN_INFO "3c529: found %s at slot %d\n",
 		   el3_mca_adapter_names[mdev->index], slot + 1);
 
 	/* claim the slot */
@@ -626,7 +630,7 @@
 	irq = mca_device_transform_irq(mdev, irq);
 	ioaddr = mca_device_transform_ioport(mdev, ioaddr);
 	if (el3_debug > 2) {
-			printk("3c529: irq %d  ioaddr 0x%x  ifport %d\n", irq, ioaddr, if_port);
+			printk(KERN_DEBUG "3c529: irq %d  ioaddr 0x%x  ifport %d\n", irq, ioaddr, if_port);
 	}
 	EL3WINDOW(0);
 	for (i = 0; i < 3; i++) {
@@ -641,13 +645,7 @@
 
 	netdev_boot_setup_check(dev);
 
-	memcpy(dev->dev_addr, phys_addr, sizeof(phys_addr));
-	dev->base_addr = ioaddr;
-	dev->irq = irq;
-	dev->if_port = if_port;
-	lp = netdev_priv(dev);
-	lp->dev = device;
-	lp->type = EL3_MCA;
+	el3_dev_fill(dev, phys_addr, ioaddr, irq, if_port, EL3_MCA);
 	device->driver_data = dev;
 	err = el3_common_init(dev);
 
@@ -657,7 +655,7 @@
 		return -ENOMEM;
 	}
 
-	el3_cards++;
+	el3_devs[el3_cards++] = dev;
 	return 0;
 }
 
@@ -666,7 +664,6 @@
 #ifdef CONFIG_EISA
 static int __init el3_eisa_probe (struct device *device)
 {
-	struct el3_private *lp;
 	short i;
 	int ioaddr, irq, if_port;
 	u16 phys_addr[3];
@@ -678,7 +675,7 @@
 	edev = to_eisa_device (device);
 	ioaddr = edev->base_addr;
 
-	if (!request_region(ioaddr, EL3_IO_EXTENT, "3c509"))
+	if (!request_region(ioaddr, EL3_IO_EXTENT, "3c579-eisa"))
 		return -EBUSY;
 
 	/* Change the register set to the configuration window 0. */
@@ -700,13 +697,7 @@
 
 	netdev_boot_setup_check(dev);
 
-	memcpy(dev->dev_addr, phys_addr, sizeof(phys_addr));
-	dev->base_addr = ioaddr;
-	dev->irq = irq;
-	dev->if_port = if_port;
-	lp = netdev_priv(dev);
-	lp->dev = device;
-	lp->type = EL3_EISA;
+	el3_dev_fill(dev, phys_addr, ioaddr, irq, if_port, EL3_EISA);
 	eisa_set_drvdata (edev, dev);
 	err = el3_common_init(dev);
 
@@ -716,12 +707,11 @@
 		return err;
 	}
 
-	el3_cards++;
+	el3_devs[el3_cards++] = dev;
 	return 0;
 }
 #endif
 
-#if defined(CONFIG_EISA) || defined(CONFIG_MCA)
 /* This remove works for all device types.
  *
  * The net dev must be stored in the driver_data field */
@@ -734,7 +724,6 @@
 	el3_common_remove (dev);
 	return 0;
 }
-#endif
 
 /* Read a word from the EEPROM using the regular EEPROM access register.
    Assume that we are in register window zero.
@@ -749,7 +738,7 @@
 }
 
 /* Read a word from the EEPROM when in the ISA ID probe state. */
-static ushort __init id_read_eeprom(int index)
+static ushort id_read_eeprom(int index)
 {
 	int bit, word = 0;
 
@@ -765,7 +754,7 @@
 		word = (word << 1) + (inb(id_port) & 0x01);
 
 	if (el3_debug > 3)
-		printk("  3c509 EEPROM word %d %#4.4x.\n", index, word);
+		printk(KERN_DEBUG "  3c509 EEPROM word %d %#4.4x.\n", index, word);
 
 	return word;
 }
@@ -787,13 +776,13 @@
 
 	EL3WINDOW(0);
 	if (el3_debug > 3)
-		printk("%s: Opening, IRQ %d	 status@%x %4.4x.\n", dev->name,
+		printk(KERN_DEBUG "%s: Opening, IRQ %d	 status@%x %4.4x.\n", dev->name,
 			   dev->irq, ioaddr + EL3_STATUS, inw(ioaddr + EL3_STATUS));
 
 	el3_up(dev);
 
 	if (el3_debug > 3)
-		printk("%s: Opened 3c509  IRQ %d  status %4.4x.\n",
+		printk(KERN_DEBUG "%s: Opened 3c509  IRQ %d  status %4.4x.\n",
 			   dev->name, dev->irq, inw(ioaddr + EL3_STATUS));
 
 	return 0;
@@ -806,7 +795,7 @@
 	int ioaddr = dev->base_addr;
 
 	/* Transmitter timeout, serious problems. */
-	printk("%s: transmit timed out, Tx_status %2.2x status %4.4x "
+	printk(KERN_WARNING "%s: transmit timed out, Tx_status %2.2x status %4.4x "
 		   "Tx FIFO room %d.\n",
 		   dev->name, inb(ioaddr + TX_STATUS), inw(ioaddr + EL3_STATUS),
 		   inw(ioaddr + TX_FREE));
@@ -831,7 +820,7 @@
 	lp->stats.tx_bytes += skb->len;
 
 	if (el3_debug > 4) {
-		printk("%s: el3_start_xmit(length = %u) called, status %4.4x.\n",
+		printk(KERN_DEBUG "%s: el3_start_xmit(length = %u) called, status %4.4x.\n",
 			   dev->name, skb->len, inw(ioaddr + EL3_STATUS));
 	}
 #if 0
@@ -840,7 +829,7 @@
 		ushort status = inw(ioaddr + EL3_STATUS);
 		if (status & 0x0001 		/* IRQ line active, missed one. */
 			&& inw(ioaddr + EL3_STATUS) & 1) { 			/* Make sure. */
-			printk("%s: Missed interrupt, status then %04x now %04x"
+			printk(KERN_DEBUG "%s: Missed interrupt, status then %04x now %04x"
 				   "  Tx %2.2x Rx %4.4x.\n", dev->name, status,
 				   inw(ioaddr + EL3_STATUS), inb(ioaddr + TX_STATUS),
 				   inw(ioaddr + RX_STATUS));
@@ -914,7 +903,7 @@
 
 	if (el3_debug > 4) {
 		status = inw(ioaddr + EL3_STATUS);
-		printk("%s: interrupt, status %4.4x.\n", dev->name, status);
+		printk(KERN_DEBUG "%s: interrupt, status %4.4x.\n", dev->name, status);
 	}
 
 	while ((status = inw(ioaddr + EL3_STATUS)) &
@@ -925,7 +914,7 @@
 
 		if (status & TxAvailable) {
 			if (el3_debug > 5)
-				printk("	TX room bit was handled.\n");
+				printk(KERN_DEBUG "	TX room bit was handled.\n");
 			/* There's room in the FIFO for a full-sized packet. */
 			outw(AckIntr | TxAvailable, ioaddr + EL3_CMD);
 			netif_wake_queue (dev);
@@ -964,7 +953,7 @@
 		}
 
 		if (--i < 0) {
-			printk("%s: Infinite loop in interrupt, status %4.4x.\n",
+			printk(KERN_ERR "%s: Infinite loop in interrupt, status %4.4x.\n",
 				   dev->name, status);
 			/* Clear all interrupts. */
 			outw(AckIntr | 0xFF, ioaddr + EL3_CMD);
@@ -975,7 +964,7 @@
 	}
 
 	if (el3_debug > 4) {
-		printk("%s: exiting interrupt, status %4.4x.\n", dev->name,
+		printk(KERN_DEBUG "%s: exiting interrupt, status %4.4x.\n", dev->name,
 			   inw(ioaddr + EL3_STATUS));
 	}
 	spin_unlock(&lp->lock);
@@ -1450,7 +1439,7 @@
 }
 
 /* Power Management support functions */
-#ifdef EL3_SUSPEND
+#ifdef CONFIG_PM
 
 static int
 el3_suspend(struct device *pdev, pm_message_t state)
@@ -1500,79 +1489,102 @@
 	return 0;
 }
 
-#endif /* EL3_SUSPEND */
-
-/* Parameters that may be passed into the module. */
-static int debug = -1;
-static int irq[] = {-1, -1, -1, -1, -1, -1, -1, -1};
-static int xcvr[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
+#endif /* CONFIG_PM */
 
 module_param(debug,int, 0);
 module_param_array(irq, int, NULL, 0);
-module_param_array(xcvr, int, NULL, 0);
 module_param(max_interrupt_work, int, 0);
 MODULE_PARM_DESC(debug, "debug level (0-6)");
 MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)");
-MODULE_PARM_DESC(xcvr,"transceiver(s) (0=internal, 1=external)");
 MODULE_PARM_DESC(max_interrupt_work, "maximum events handled per interrupt");
-#if defined(__ISAPNP__)
+#ifdef CONFIG_PNP
 module_param(nopnp, int, 0);
 MODULE_PARM_DESC(nopnp, "disable ISA PnP support (0-1)");
-MODULE_DEVICE_TABLE(isapnp, el3_isapnp_adapters);
-#endif	/* __ISAPNP__ */
-MODULE_DESCRIPTION("3Com Etherlink III (3c509, 3c509B) ISA/PnP ethernet driver");
+#endif	/* CONFIG_PNP */
+MODULE_DESCRIPTION("3Com Etherlink III (3c509, 3c509B, 3c529, 3c579) ethernet driver");
 MODULE_LICENSE("GPL");
 
 static int __init el3_init_module(void)
 {
 	int ret = 0;
-	el3_cards = 0;
 
 	if (debug >= 0)
 		el3_debug = debug;
 
-	el3_root_dev = NULL;
-	while (el3_probe(el3_cards) == 0) {
-		if (irq[el3_cards] > 1)
-			el3_root_dev->irq = irq[el3_cards];
-		if (xcvr[el3_cards] >= 0)
-			el3_root_dev->if_port = xcvr[el3_cards];
-		el3_cards++;
+#ifdef CONFIG_PNP
+	if (!nopnp) {
+		ret = pnp_register_driver(&el3_pnp_driver);
+		if (!ret)
+			pnp_registered = 1;
+	}
+#endif
+	/* Select an open I/O location at 0x1*0 to do ISA contention select. */
+	/* Start with 0x110 to avoid some sound cards.*/
+	for (id_port = 0x110 ; id_port < 0x200; id_port += 0x10) {
+		if (!request_region(id_port, 1, "3c509-control"))
+			continue;
+		outb(0x00, id_port);
+		outb(0xff, id_port);
+		if (inb(id_port) & 0x01)
+			break;
+		else
+			release_region(id_port, 1);
+	}
+	if (id_port >= 0x200) {
+		id_port = 0;
+		printk(KERN_ERR "No I/O port available for 3c509 activation.\n");
+	} else {
+		ret = isa_register_driver(&el3_isa_driver, EL3_MAX_CARDS);
+		if (!ret)
+			isa_registered = 1;
 	}
-
 #ifdef CONFIG_EISA
 	ret = eisa_driver_register(&el3_eisa_driver);
+	if (!ret)
+		eisa_registered = 1;
 #endif
 #ifdef CONFIG_MCA
-	{
-		int err = mca_register_driver(&el3_mca_driver);
-		if (ret == 0)
-			ret = err;
-	}
+	ret = mca_register_driver(&el3_mca_driver);
+	if (!ret)
+		mca_registered = 1;
+#endif
+
+#ifdef CONFIG_PNP
+	if (pnp_registered)
+		ret = 0;
+#endif
+	if (isa_registered)
+		ret = 0;
+#ifdef CONFIG_EISA
+	if (eisa_registered)
+		ret = 0;
+#endif
+#ifdef CONFIG_MCA
+	if (mca_registered)
+		ret = 0;
 #endif
 	return ret;
 }
 
 static void __exit el3_cleanup_module(void)
 {
-	struct net_device *next_dev;
-
-	while (el3_root_dev) {
-		struct el3_private *lp = netdev_priv(el3_root_dev);
-
-		next_dev = lp->next_dev;
-		el3_common_remove (el3_root_dev);
-		el3_root_dev = next_dev;
-	}
-
+#ifdef CONFIG_PNP
+	if (pnp_registered)
+		pnp_unregister_driver(&el3_pnp_driver);
+#endif
+	if (isa_registered)
+		isa_unregister_driver(&el3_isa_driver);
+	if (id_port)
+		release_region(id_port, 1);
 #ifdef CONFIG_EISA
-	eisa_driver_unregister (&el3_eisa_driver);
+	if (eisa_registered)
+		eisa_driver_unregister(&el3_eisa_driver);
 #endif
 #ifdef CONFIG_MCA
-	mca_unregister_driver(&el3_mca_driver);
+	if (mca_registered)
+		mca_unregister_driver(&el3_mca_driver);
 #endif
 }
 
 module_init (el3_init_module);
 module_exit (el3_cleanup_module);
-


-- 
Ondrej Zary

^ permalink raw reply

* [2.6.25-rc2] System freezes ca. 1 minute after logging into KDE
From: Frans Pop @ 2008-02-17 10:39 UTC (permalink / raw)
  To: davem; +Cc: linux-kernel, netdev

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

(resend a third time because previous attempts never reached the lists
due to a bug in my MUA; my apologies to David for spamming his inbox)

Linus Torvalds wrote:
> But hey, you can try to prove me wrong.  I dare you.
Me too, me too!
 
Weird issue this.
About a minute after logging into KDE the system freezes, but only 
partially. The keyboard is completely dead in all cases (no console 
switching, no SysRq), but some tasks stay running. One time music continued 
playing, other times it stopped. One time the desktop clock continued 
ticking, other times it stopped. One time I could close a window using the 
mouse, but other windows were frozen.
It's not just KDE that's frozen; one time I switched to VT1 before the 
freeze happened, but that became unusable too.
Zilch in the logs.

I've bisected it down to:
commit 69cc64d8d92bf852f933e90c888dfff083bd4fc9
Author: David S. Miller <davem@davemloft.net>
    [NDISC]: Fix race in generic address resolution

Confirmed that this is really the culprit by reverting this commit on top 
of -rc2, which is now running fine.

I'm using IPv6 (local network only) together with IPv4, use a bridge (br0) 
and have an NFS4 mount active.

Cheers,
FJP


[-- Attachment #2: config-2.6.25-rc2 --]
[-- Type: text/plain, Size: 57858 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.25-rc2
# Sat Feb 16 19:44:50 2008
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
CONFIG_X86_64=y
CONFIG_X86=y
# CONFIG_GENERIC_LOCKBREAK is not set
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_SEMAPHORE_SLEEPERS=y
CONFIG_FAST_CMPXCHG_LOCAL=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
# CONFIG_QUICKLIST is not set
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
# CONFIG_GENERIC_GPIO is not set
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_DMI=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ZONE_DMA32=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_AUDIT_ARCH=y
CONFIG_ARCH_SUPPORTS_AOUT=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_X86_SMP=y
CONFIG_X86_64_SMP=y
CONFIG_X86_HT=y
CONFIG_X86_TRAMPOLINE=y
# CONFIG_KTIME_SCALAR is not set
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
# CONFIG_TASKSTATS is not set
CONFIG_AUDIT=y
# CONFIG_AUDITSYSCALL is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=16
# CONFIG_CGROUPS is not set
# CONFIG_GROUP_SCHED is not set
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_RELAY is not set
CONFIG_NAMESPACES=y
# CONFIG_UTS_NS is not set
# CONFIG_IPC_NS is not set
# CONFIG_USER_NS is not set
# CONFIG_PID_NS is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
# CONFIG_COMPAT_BRK is not set
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_SLAB=y
# CONFIG_SLUB is not set
# CONFIG_SLOB is not set
# CONFIG_PROFILING is not set
# CONFIG_MARKERS is not set
CONFIG_HAVE_OPROFILE=y
# CONFIG_KPROBES is not set
CONFIG_HAVE_KPROBES=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
# CONFIG_BLK_DEV_IO_TRACE is not set
# CONFIG_BLK_DEV_BSG is not set
CONFIG_BLOCK_COMPAT=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_AS is not set
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_CLASSIC_RCU=y
# CONFIG_PREEMPT_RCU is not set

#
# Processor type and features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_SMP=y
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_X86_RDC321X is not set
# CONFIG_X86_VSMP is not set
# CONFIG_PARAVIRT_GUEST is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not set
CONFIG_GENERIC_CPU=y
CONFIG_X86_L1_CACHE_BYTES=128
CONFIG_X86_INTERNODE_CACHE_BYTES=128
CONFIG_X86_CMPXCHG=y
CONFIG_X86_L1_CACHE_SHIFT=7
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_TSC=y
CONFIG_X86_MINIMUM_CPU_FAMILY=64
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_GART_IOMMU=y
CONFIG_CALGARY_IOMMU=y
CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
CONFIG_IOMMU_HELPER=y
CONFIG_SWIOTLB=y
CONFIG_NR_CPUS=32
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_RCU_TRACE=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_INTEL=y
# CONFIG_X86_MCE_AMD is not set
# CONFIG_I8K is not set
CONFIG_MICROCODE=m
CONFIG_MICROCODE_OLD_INTERFACE=y
CONFIG_X86_MSR=m
CONFIG_X86_CPUID=m
CONFIG_NUMA=y
CONFIG_K8_NUMA=y
CONFIG_X86_64_ACPI_NUMA=y
# CONFIG_NUMA_EMU is not set
CONFIG_NODES_SHIFT=6
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_FLATMEM_MANUAL is not set
# CONFIG_DISCONTIGMEM_MANUAL is not set
CONFIG_SPARSEMEM_MANUAL=y
CONFIG_SPARSEMEM=y
CONFIG_NEED_MULTIPLE_NODES=y
CONFIG_HAVE_MEMORY_PRESENT=y
# CONFIG_SPARSEMEM_STATIC is not set
CONFIG_SPARSEMEM_EXTREME=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPARSEMEM_VMEMMAP=y

#
# Memory hotplug is currently incompatible with Software Suspend
#
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_MIGRATION=y
CONFIG_RESOURCES_64BIT=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_MTRR=y
# CONFIG_EFI is not set
# CONFIG_SECCOMP is not set
# CONFIG_CC_STACKPROTECTOR is not set
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_SCHED_HRTICK=y
CONFIG_KEXEC=y
# CONFIG_CRASH_DUMP is not set
CONFIG_PHYSICAL_START=0x200000
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_ALIGN=0x200000
CONFIG_HOTPLUG_CPU=y
# CONFIG_COMPAT_VDSO is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y

#
# Power management options
#
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_PM=y
CONFIG_PM_LEGACY=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HIBERNATION=y
CONFIG_PM_STD_PARTITION=""
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_PROCFS=y
CONFIG_ACPI_PROCFS_POWER=y
CONFIG_ACPI_SYSFS_POWER=y
CONFIG_ACPI_PROC_EVENT=y
CONFIG_ACPI_AC=m
CONFIG_ACPI_BATTERY=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_VIDEO=m
CONFIG_ACPI_FAN=m
CONFIG_ACPI_DOCK=m
# CONFIG_ACPI_BAY is not set
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=m
CONFIG_ACPI_NUMA=y
# CONFIG_ACPI_WMI is not set
CONFIG_ACPI_ASUS=m
CONFIG_ACPI_TOSHIBA=m
# CONFIG_ACPI_CUSTOM_DSDT_INITRD is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=m
CONFIG_ACPI_SBS=m

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=m
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=m
# CONFIG_CPU_FREQ_STAT_DETAILS is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m

#
# CPUFreq processor drivers
#
CONFIG_X86_ACPI_CPUFREQ=m
CONFIG_X86_POWERNOW_K8=m
CONFIG_X86_POWERNOW_K8_ACPI=y
CONFIG_X86_SPEEDSTEP_CENTRINO=m
# CONFIG_X86_P4_CLOCKMOD is not set

#
# shared options
#
# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
# CONFIG_X86_SPEEDSTEP_LIB is not set
# CONFIG_CPU_IDLE is not set

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCI_DOMAINS=y
# CONFIG_DMAR is not set
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI_PCIE=m
CONFIG_PCIEAER=y
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
CONFIG_PCI_LEGACY=y
# CONFIG_PCI_DEBUG is not set
CONFIG_HT_IRQ=y
CONFIG_ISA_DMA_API=y
CONFIG_K8_NB=y
# CONFIG_PCCARD is not set
CONFIG_HOTPLUG_PCI=m
CONFIG_HOTPLUG_PCI_FAKE=m
CONFIG_HOTPLUG_PCI_ACPI=m
CONFIG_HOTPLUG_PCI_ACPI_IBM=m
CONFIG_HOTPLUG_PCI_CPCI=y
CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
CONFIG_HOTPLUG_PCI_SHPC=m

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_BINFMT_MISC=m
CONFIG_IA32_EMULATION=y
CONFIG_IA32_AOUT=y
CONFIG_COMPAT=y
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
CONFIG_SYSVIPC_COMPAT=y

#
# Networking
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_MMAP=y
CONFIG_UNIX=y
CONFIG_XFRM=y
CONFIG_XFRM_USER=m
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_XFRM_STATISTICS is not set
CONFIG_NET_KEY=m
# CONFIG_NET_KEY_MIGRATE is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_ASK_IP_FIB_HASH=y
# CONFIG_IP_FIB_TRIE is not set
CONFIG_IP_FIB_HASH=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y
# CONFIG_IP_PNP is not set
CONFIG_NET_IPIP=m
CONFIG_NET_IPGRE=m
CONFIG_NET_IPGRE_BROADCAST=y
CONFIG_IP_MROUTE=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
# CONFIG_ARPD is not set
CONFIG_SYN_COOKIES=y
CONFIG_INET_AH=m
CONFIG_INET_ESP=m
CONFIG_INET_IPCOMP=m
CONFIG_INET_XFRM_TUNNEL=m
CONFIG_INET_TUNNEL=m
CONFIG_INET_XFRM_MODE_TRANSPORT=m
CONFIG_INET_XFRM_MODE_TUNNEL=m
CONFIG_INET_XFRM_MODE_BEET=m
CONFIG_INET_LRO=m
CONFIG_INET_DIAG=m
CONFIG_INET_TCP_DIAG=m
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_BIC=y
CONFIG_TCP_CONG_CUBIC=m
CONFIG_TCP_CONG_WESTWOOD=m
CONFIG_TCP_CONG_HTCP=m
CONFIG_TCP_CONG_HSTCP=m
CONFIG_TCP_CONG_HYBLA=m
CONFIG_TCP_CONG_VEGAS=m
CONFIG_TCP_CONG_SCALABLE=m
CONFIG_TCP_CONG_LP=m
CONFIG_TCP_CONG_VENO=m
CONFIG_TCP_CONG_YEAH=m
CONFIG_TCP_CONG_ILLINOIS=m
CONFIG_DEFAULT_BIC=y
# CONFIG_DEFAULT_CUBIC is not set
# CONFIG_DEFAULT_HTCP is not set
# CONFIG_DEFAULT_VEGAS is not set
# CONFIG_DEFAULT_WESTWOOD is not set
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="bic"
# CONFIG_TCP_MD5SIG is not set
CONFIG_IP_VS=m
# CONFIG_IP_VS_DEBUG is not set
CONFIG_IP_VS_TAB_BITS=12

#
# IPVS transport protocol load balancing support
#
CONFIG_IP_VS_PROTO_TCP=y
CONFIG_IP_VS_PROTO_UDP=y
CONFIG_IP_VS_PROTO_ESP=y
CONFIG_IP_VS_PROTO_AH=y

#
# IPVS scheduler
#
CONFIG_IP_VS_RR=m
CONFIG_IP_VS_WRR=m
CONFIG_IP_VS_LC=m
CONFIG_IP_VS_WLC=m
CONFIG_IP_VS_LBLC=m
CONFIG_IP_VS_LBLCR=m
CONFIG_IP_VS_DH=m
CONFIG_IP_VS_SH=m
CONFIG_IP_VS_SED=m
CONFIG_IP_VS_NQ=m

#
# IPVS application helper
#
CONFIG_IP_VS_FTP=m
CONFIG_IPV6=m
CONFIG_IPV6_PRIVACY=y
# CONFIG_IPV6_ROUTER_PREF is not set
# CONFIG_IPV6_OPTIMISTIC_DAD is not set
CONFIG_INET6_AH=m
CONFIG_INET6_ESP=m
CONFIG_INET6_IPCOMP=m
# CONFIG_IPV6_MIP6 is not set
CONFIG_INET6_XFRM_TUNNEL=m
CONFIG_INET6_TUNNEL=m
CONFIG_INET6_XFRM_MODE_TRANSPORT=m
CONFIG_INET6_XFRM_MODE_TUNNEL=m
CONFIG_INET6_XFRM_MODE_BEET=m
CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
CONFIG_IPV6_SIT=m
CONFIG_IPV6_TUNNEL=m
# CONFIG_IPV6_MULTIPLE_TABLES is not set
# CONFIG_NETLABEL is not set
CONFIG_NETWORK_SECMARK=y
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y
CONFIG_BRIDGE_NETFILTER=y

#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m
CONFIG_NF_CONNTRACK=m
CONFIG_NF_CT_ACCT=y
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_GRE=m
CONFIG_NF_CT_PROTO_SCTP=m
# CONFIG_NF_CT_PROTO_UDPLITE is not set
CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m
CONFIG_NF_CONNTRACK_IRC=m
CONFIG_NF_CONNTRACK_NETBIOS_NS=m
CONFIG_NF_CONNTRACK_PPTP=m
CONFIG_NF_CONNTRACK_SANE=m
CONFIG_NF_CONNTRACK_SIP=m
CONFIG_NF_CONNTRACK_TFTP=m
CONFIG_NF_CT_NETLINK=m
CONFIG_NETFILTER_XTABLES=m
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
CONFIG_NETFILTER_XT_TARGET_DSCP=m
CONFIG_NETFILTER_XT_TARGET_MARK=m
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
CONFIG_NETFILTER_XT_TARGET_NFLOG=m
CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
CONFIG_NETFILTER_XT_TARGET_RATEEST=m
CONFIG_NETFILTER_XT_TARGET_TRACE=m
CONFIG_NETFILTER_XT_TARGET_SECMARK=m
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
CONFIG_NETFILTER_XT_MATCH_DCCP=m
CONFIG_NETFILTER_XT_MATCH_DSCP=m
CONFIG_NETFILTER_XT_MATCH_ESP=m
CONFIG_NETFILTER_XT_MATCH_HELPER=m
CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
CONFIG_NETFILTER_XT_MATCH_MAC=m
CONFIG_NETFILTER_XT_MATCH_MARK=m
CONFIG_NETFILTER_XT_MATCH_OWNER=m
CONFIG_NETFILTER_XT_MATCH_POLICY=m
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
CONFIG_NETFILTER_XT_MATCH_QUOTA=m
CONFIG_NETFILTER_XT_MATCH_RATEEST=m
CONFIG_NETFILTER_XT_MATCH_REALM=m
CONFIG_NETFILTER_XT_MATCH_SCTP=m
CONFIG_NETFILTER_XT_MATCH_STATE=m
CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
CONFIG_NETFILTER_XT_MATCH_STRING=m
CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
CONFIG_NETFILTER_XT_MATCH_TIME=m
CONFIG_NETFILTER_XT_MATCH_U32=m
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m

#
# IP: Netfilter Configuration
#
CONFIG_NF_CONNTRACK_IPV4=m
CONFIG_NF_CONNTRACK_PROC_COMPAT=y
CONFIG_IP_NF_QUEUE=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_RECENT=m
CONFIG_IP_NF_MATCH_ECN=m
CONFIG_IP_NF_MATCH_AH=m
CONFIG_IP_NF_MATCH_TTL=m
CONFIG_IP_NF_MATCH_ADDRTYPE=m
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_NF_NAT=m
CONFIG_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_IP_NF_TARGET_NETMAP=m
CONFIG_NF_NAT_SNMP_BASIC=m
CONFIG_NF_NAT_PROTO_GRE=m
CONFIG_NF_NAT_FTP=m
CONFIG_NF_NAT_IRC=m
CONFIG_NF_NAT_TFTP=m
CONFIG_NF_NAT_AMANDA=m
CONFIG_NF_NAT_PPTP=m
CONFIG_NF_NAT_H323=m
CONFIG_NF_NAT_SIP=m
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_ECN=m
CONFIG_IP_NF_TARGET_TTL=m
CONFIG_IP_NF_TARGET_CLUSTERIP=m
CONFIG_IP_NF_RAW=m
CONFIG_IP_NF_ARPTABLES=m
CONFIG_IP_NF_ARPFILTER=m
CONFIG_IP_NF_ARP_MANGLE=m

#
# IPv6: Netfilter Configuration
#
CONFIG_NF_CONNTRACK_IPV6=m
CONFIG_IP6_NF_QUEUE=m
CONFIG_IP6_NF_IPTABLES=m
CONFIG_IP6_NF_MATCH_RT=m
CONFIG_IP6_NF_MATCH_OPTS=m
CONFIG_IP6_NF_MATCH_FRAG=m
CONFIG_IP6_NF_MATCH_HL=m
CONFIG_IP6_NF_MATCH_IPV6HEADER=m
CONFIG_IP6_NF_MATCH_AH=m
CONFIG_IP6_NF_MATCH_MH=m
CONFIG_IP6_NF_MATCH_EUI64=m
CONFIG_IP6_NF_FILTER=m
CONFIG_IP6_NF_TARGET_LOG=m
CONFIG_IP6_NF_TARGET_REJECT=m
CONFIG_IP6_NF_MANGLE=m
CONFIG_IP6_NF_TARGET_HL=m
CONFIG_IP6_NF_RAW=m

#
# Bridge: Netfilter Configuration
#
CONFIG_BRIDGE_NF_EBTABLES=m
CONFIG_BRIDGE_EBT_BROUTE=m
CONFIG_BRIDGE_EBT_T_FILTER=m
CONFIG_BRIDGE_EBT_T_NAT=m
CONFIG_BRIDGE_EBT_802_3=m
CONFIG_BRIDGE_EBT_AMONG=m
CONFIG_BRIDGE_EBT_ARP=m
CONFIG_BRIDGE_EBT_IP=m
CONFIG_BRIDGE_EBT_LIMIT=m
CONFIG_BRIDGE_EBT_MARK=m
CONFIG_BRIDGE_EBT_PKTTYPE=m
CONFIG_BRIDGE_EBT_STP=m
CONFIG_BRIDGE_EBT_VLAN=m
CONFIG_BRIDGE_EBT_ARPREPLY=m
CONFIG_BRIDGE_EBT_DNAT=m
CONFIG_BRIDGE_EBT_MARK_T=m
CONFIG_BRIDGE_EBT_REDIRECT=m
CONFIG_BRIDGE_EBT_SNAT=m
CONFIG_BRIDGE_EBT_LOG=m
CONFIG_BRIDGE_EBT_ULOG=m
CONFIG_IP_DCCP=m
CONFIG_INET_DCCP_DIAG=m
CONFIG_IP_DCCP_ACKVEC=y

#
# DCCP CCIDs Configuration (EXPERIMENTAL)
#
CONFIG_IP_DCCP_CCID2=m
# CONFIG_IP_DCCP_CCID2_DEBUG is not set
CONFIG_IP_DCCP_CCID3=m
# CONFIG_IP_DCCP_CCID3_DEBUG is not set
CONFIG_IP_DCCP_CCID3_RTO=100
CONFIG_IP_DCCP_TFRC_LIB=m

#
# DCCP Kernel Hacking
#
# CONFIG_IP_DCCP_DEBUG is not set
CONFIG_IP_SCTP=m
# CONFIG_SCTP_DBG_MSG is not set
# CONFIG_SCTP_DBG_OBJCNT is not set
# CONFIG_SCTP_HMAC_NONE is not set
# CONFIG_SCTP_HMAC_SHA1 is not set
CONFIG_SCTP_HMAC_MD5=y
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
CONFIG_BRIDGE=m
CONFIG_VLAN_8021Q=m
# CONFIG_DECNET is not set
CONFIG_LLC=m
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
CONFIG_NET_SCHED=y

#
# Queueing/Scheduling
#
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
CONFIG_NET_SCH_HFSC=m
CONFIG_NET_SCH_PRIO=m
CONFIG_NET_SCH_RR=m
CONFIG_NET_SCH_RED=m
CONFIG_NET_SCH_SFQ=m
CONFIG_NET_SCH_TEQL=m
CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m
CONFIG_NET_SCH_NETEM=m
CONFIG_NET_SCH_INGRESS=m

#
# Classification
#
CONFIG_NET_CLS=y
CONFIG_NET_CLS_BASIC=m
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
CONFIG_CLS_U32_PERF=y
CONFIG_CLS_U32_MARK=y
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
# CONFIG_NET_CLS_FLOW is not set
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
CONFIG_NET_EMATCH_CMP=m
CONFIG_NET_EMATCH_NBYTE=m
CONFIG_NET_EMATCH_U32=m
CONFIG_NET_EMATCH_META=m
CONFIG_NET_EMATCH_TEXT=m
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=m
CONFIG_NET_ACT_GACT=m
CONFIG_GACT_PROB=y
CONFIG_NET_ACT_MIRRED=m
CONFIG_NET_ACT_IPT=m
CONFIG_NET_ACT_NAT=m
CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_ACT_SIMP=m
CONFIG_NET_CLS_IND=y
CONFIG_NET_SCH_FIFO=y

#
# Network testing
#
CONFIG_NET_PKTGEN=m
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
CONFIG_AF_RXRPC=m
# CONFIG_AF_RXRPC_DEBUG is not set
CONFIG_RXKAD=m
CONFIG_FIB_RULES=y

#
# Wireless
#
# CONFIG_CFG80211 is not set
# CONFIG_WIRELESS_EXT is not set
# CONFIG_MAC80211 is not set
# CONFIG_IEEE80211 is not set
CONFIG_RFKILL=m
CONFIG_RFKILL_INPUT=m
CONFIG_RFKILL_LEDS=y
# CONFIG_NET_9P is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=m
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
CONFIG_CONNECTOR=m
CONFIG_MTD=m
# CONFIG_MTD_DEBUG is not set
CONFIG_MTD_CONCAT=m
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_REDBOOT_PARTS=m
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set

#
# User Modules And Translation Layers
#
CONFIG_MTD_CHAR=m
CONFIG_MTD_BLKDEVS=m
CONFIG_MTD_BLOCK=m
CONFIG_MTD_BLOCK_RO=m
CONFIG_FTL=m
CONFIG_NFTL=m
CONFIG_NFTL_RW=y
CONFIG_INFTL=m
CONFIG_RFD_FTL=m
CONFIG_SSFDC=m
# CONFIG_MTD_OOPS is not set

#
# RAM/ROM/Flash chip drivers
#
CONFIG_MTD_CFI=m
CONFIG_MTD_JEDECPROBE=m
CONFIG_MTD_GEN_PROBE=m
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_CFI_I4 is not set
# CONFIG_MTD_CFI_I8 is not set
CONFIG_MTD_CFI_INTELEXT=m
CONFIG_MTD_CFI_AMDSTD=m
CONFIG_MTD_CFI_STAA=m
CONFIG_MTD_CFI_UTIL=m
CONFIG_MTD_RAM=m
CONFIG_MTD_ROM=m
CONFIG_MTD_ABSENT=m

#
# Mapping drivers for chip access
#
CONFIG_MTD_COMPLEX_MAPPINGS=y
CONFIG_MTD_PHYSMAP=m
CONFIG_MTD_PHYSMAP_START=0x8000000
CONFIG_MTD_PHYSMAP_LEN=0x4000000
CONFIG_MTD_PHYSMAP_BANKWIDTH=2
CONFIG_MTD_SC520CDP=m
CONFIG_MTD_NETSC520=m
CONFIG_MTD_TS5500=m
CONFIG_MTD_SBC_GXX=m
# CONFIG_MTD_AMD76XROM is not set
# CONFIG_MTD_ICHXROM is not set
# CONFIG_MTD_ESB2ROM is not set
# CONFIG_MTD_CK804XROM is not set
# CONFIG_MTD_SCB2_FLASH is not set
CONFIG_MTD_NETtel=m
CONFIG_MTD_DILNETPC=m
CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000
# CONFIG_MTD_L440GX is not set
CONFIG_MTD_PCI=m
# CONFIG_MTD_INTEL_VR_NOR is not set
CONFIG_MTD_PLATRAM=m

#
# Self-contained MTD device drivers
#
CONFIG_MTD_PMC551=m
# CONFIG_MTD_PMC551_BUGFIX is not set
# CONFIG_MTD_PMC551_DEBUG is not set
CONFIG_MTD_SLRAM=m
CONFIG_MTD_PHRAM=m
CONFIG_MTD_MTDRAM=m
CONFIG_MTDRAM_TOTAL_SIZE=4096
CONFIG_MTDRAM_ERASE_SIZE=128
CONFIG_MTD_BLOCK2MTD=m

#
# Disk-On-Chip Device Drivers
#
CONFIG_MTD_DOC2000=m
CONFIG_MTD_DOC2001=m
CONFIG_MTD_DOC2001PLUS=m
CONFIG_MTD_DOCPROBE=m
CONFIG_MTD_DOCECC=m
# CONFIG_MTD_DOCPROBE_ADVANCED is not set
CONFIG_MTD_DOCPROBE_ADDRESS=0
CONFIG_MTD_NAND=m
# CONFIG_MTD_NAND_VERIFY_WRITE is not set
# CONFIG_MTD_NAND_ECC_SMC is not set
# CONFIG_MTD_NAND_MUSEUM_IDS is not set
CONFIG_MTD_NAND_IDS=m
CONFIG_MTD_NAND_DISKONCHIP=m
# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
CONFIG_MTD_NAND_CAFE=m
# CONFIG_MTD_NAND_NANDSIM is not set
CONFIG_MTD_NAND_PLATFORM=m
# CONFIG_MTD_ALAUDA is not set
CONFIG_MTD_ONENAND=m
CONFIG_MTD_ONENAND_VERIFY_WRITE=y
# CONFIG_MTD_ONENAND_OTP is not set
# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
# CONFIG_MTD_ONENAND_SIM is not set

#
# UBI - Unsorted block images
#
CONFIG_MTD_UBI=m
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_RESERVE=1
# CONFIG_MTD_UBI_GLUEBI is not set

#
# UBI debugging options
#
# CONFIG_MTD_UBI_DEBUG is not set
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m
CONFIG_PARPORT_PC_FIFO=y
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_GSC is not set
CONFIG_PARPORT_AX88796=m
CONFIG_PARPORT_1284=y
CONFIG_PARPORT_NOT_PC=y
CONFIG_PNP=y
CONFIG_PNP_DEBUG=y

#
# Protocols
#
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_FD=m
CONFIG_PARIDE=m

#
# Parallel IDE high-level drivers
#
CONFIG_PARIDE_PD=m
CONFIG_PARIDE_PCD=m
CONFIG_PARIDE_PF=m
CONFIG_PARIDE_PT=m
CONFIG_PARIDE_PG=m

#
# Parallel IDE protocol modules
#
CONFIG_PARIDE_ATEN=m
CONFIG_PARIDE_BPCK=m
CONFIG_PARIDE_COMM=m
CONFIG_PARIDE_DSTR=m
CONFIG_PARIDE_FIT2=m
CONFIG_PARIDE_FIT3=m
CONFIG_PARIDE_EPAT=m
# CONFIG_PARIDE_EPATC8 is not set
CONFIG_PARIDE_EPIA=m
CONFIG_PARIDE_FRIQ=m
CONFIG_PARIDE_FRPW=m
CONFIG_PARIDE_KBIC=m
CONFIG_PARIDE_KTTI=m
CONFIG_PARIDE_ON20=m
CONFIG_PARIDE_ON26=m
# CONFIG_BLK_CPQ_DA is not set
CONFIG_BLK_CPQ_CISS_DA=m
CONFIG_CISS_SCSI_TAPE=y
CONFIG_BLK_DEV_DAC960=m
CONFIG_BLK_DEV_UMEM=m
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
CONFIG_BLK_DEV_SX8=m
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=65536
# CONFIG_BLK_DEV_XIP is not set
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
CONFIG_ATA_OVER_ETH=m
# CONFIG_MISC_DEVICES is not set
CONFIG_HAVE_IDE=y
CONFIG_IDE=m
CONFIG_BLK_DEV_IDE=m

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=m
# CONFIG_IDEDISK_MULTI_MODE is not set
CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
CONFIG_BLK_DEV_IDETAPE=m
CONFIG_BLK_DEV_IDEFLOPPY=m
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_BLK_DEV_IDEACPI is not set
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_PROC_FS=y

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=m
# CONFIG_BLK_DEV_PLATFORM is not set
# CONFIG_BLK_DEV_CMD640 is not set
CONFIG_BLK_DEV_IDEPNP=m
CONFIG_BLK_DEV_IDEDMA_SFF=y

#
# PCI IDE chipsets support
#
CONFIG_BLK_DEV_IDEPCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=m
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
CONFIG_BLK_DEV_PIIX=m
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_IDE_ARCH_OBSOLETE_INIT=y
# CONFIG_BLK_DEV_HD is not set

#
# SCSI device support
#
CONFIG_RAID_ATTRS=m
CONFIG_SCSI=m
CONFIG_SCSI_DMA=y
CONFIG_SCSI_TGT=m
CONFIG_SCSI_NETLINK=y
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=m
CONFIG_CHR_DEV_ST=m
CONFIG_CHR_DEV_OSST=m
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=m
CONFIG_CHR_DEV_SCH=m

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y
CONFIG_SCSI_WAIT_SCAN=m

#
# SCSI Transports
#
CONFIG_SCSI_SPI_ATTRS=m
CONFIG_SCSI_FC_ATTRS=m
# CONFIG_SCSI_FC_TGT_ATTRS is not set
CONFIG_SCSI_ISCSI_ATTRS=m
CONFIG_SCSI_SAS_ATTRS=m
CONFIG_SCSI_SAS_LIBSAS=m
# CONFIG_SCSI_SAS_ATA is not set
CONFIG_SCSI_SAS_HOST_SMP=y
# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
# CONFIG_SCSI_SRP_ATTRS is not set
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_ATA=m
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_ACPI=y
CONFIG_SATA_AHCI=m
# CONFIG_SATA_SVW is not set
CONFIG_ATA_PIIX=m
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SX4 is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIL24 is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_PATA_ACPI is not set
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
CONFIG_ATA_GENERIC=m
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RZ1000 is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
CONFIG_MD=y
CONFIG_BLK_DEV_MD=m
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID10=m
CONFIG_MD_RAID456=m
CONFIG_MD_RAID5_RESHAPE=y
CONFIG_MD_MULTIPATH=m
CONFIG_MD_FAULTY=m
CONFIG_BLK_DEV_DM=m
# CONFIG_DM_DEBUG is not set
CONFIG_DM_CRYPT=m
CONFIG_DM_SNAPSHOT=m
CONFIG_DM_MIRROR=m
CONFIG_DM_ZERO=m
CONFIG_DM_MULTIPATH=m
CONFIG_DM_MULTIPATH_EMC=m
# CONFIG_DM_MULTIPATH_RDAC is not set
# CONFIG_DM_MULTIPATH_HP is not set
CONFIG_DM_DELAY=m
# CONFIG_DM_UEVENT is not set
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#
CONFIG_FIREWIRE=m
CONFIG_FIREWIRE_OHCI=m
CONFIG_FIREWIRE_SBP2=m
# CONFIG_IEEE1394 is not set
CONFIG_I2O=m
CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
CONFIG_I2O_EXT_ADAPTEC=y
CONFIG_I2O_EXT_ADAPTEC_DMA64=y
CONFIG_I2O_CONFIG=m
CONFIG_I2O_CONFIG_OLD_IOCTL=y
CONFIG_I2O_BUS=m
CONFIG_I2O_BLOCK=m
CONFIG_I2O_SCSI=m
CONFIG_I2O_PROC=m
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
# CONFIG_NETDEVICES_MULTIQUEUE is not set
CONFIG_IFB=m
CONFIG_DUMMY=m
CONFIG_BONDING=m
# CONFIG_MACVLAN is not set
CONFIG_EQUALIZER=m
CONFIG_TUN=m
# CONFIG_VETH is not set
# CONFIG_NET_SB1000 is not set
# CONFIG_ARCNET is not set
# CONFIG_NET_ETHERNET is not set
CONFIG_MII=m
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
CONFIG_E1000=m
CONFIG_E1000_NAPI=y
# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
CONFIG_E1000E=m
CONFIG_E1000E_ENABLED=y
# CONFIG_IP1000 is not set
# CONFIG_IGB is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_SK98LIN is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set
# CONFIG_BNX2 is not set
# CONFIG_QLA3XXX is not set
# CONFIG_ATL1 is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set

#
# Wireless LAN
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set

#
# USB Network Adapters
#
CONFIG_USB_CATC=m
CONFIG_USB_KAWETH=m
CONFIG_USB_PEGASUS=m
CONFIG_USB_RTL8150=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_CDCETHER=m
CONFIG_USB_NET_DM9601=m
CONFIG_USB_NET_GL620A=m
CONFIG_USB_NET_NET1080=m
CONFIG_USB_NET_PLUSB=m
CONFIG_USB_NET_MCS7830=m
CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_NET_CDC_SUBSET=m
CONFIG_USB_ALI_M5632=y
CONFIG_USB_AN2720=y
CONFIG_USB_BELKIN=y
CONFIG_USB_ARMLINUX=y
CONFIG_USB_EPSON2888=y
CONFIG_USB_KC2190=y
CONFIG_USB_NET_ZAURUS=m
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
CONFIG_PLIP=m
CONFIG_PPP=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_MPPE=m
CONFIG_PPPOE=m
# CONFIG_PPPOL2TP is not set
CONFIG_SLIP=m
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLHC=m
CONFIG_SLIP_SMART=y
# CONFIG_SLIP_MODE_SLIP6 is not set
# CONFIG_NET_FC is not set
CONFIG_NETCONSOLE=m
CONFIG_NETCONSOLE_DYNAMIC=y
CONFIG_NETPOLL=y
# CONFIG_NETPOLL_TRAP is not set
CONFIG_NET_POLL_CONTROLLER=y
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
CONFIG_INPUT_FF_MEMLESS=m
CONFIG_INPUT_POLLDEV=m

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=m
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
CONFIG_KEYBOARD_XTKBD=m
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=m
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
CONFIG_MOUSE_SERIAL=m
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_VSXXXAA is not set
CONFIG_INPUT_JOYSTICK=y
# CONFIG_JOYSTICK_ANALOG is not set
# CONFIG_JOYSTICK_A3D is not set
# CONFIG_JOYSTICK_ADI is not set
# CONFIG_JOYSTICK_COBRA is not set
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
# CONFIG_JOYSTICK_GRIP_MP is not set
# CONFIG_JOYSTICK_GUILLEMOT is not set
# CONFIG_JOYSTICK_INTERACT is not set
CONFIG_JOYSTICK_SIDEWINDER=m
# CONFIG_JOYSTICK_TMDC is not set
# CONFIG_JOYSTICK_IFORCE is not set
# CONFIG_JOYSTICK_WARRIOR is not set
# CONFIG_JOYSTICK_MAGELLAN is not set
# CONFIG_JOYSTICK_SPACEORB is not set
# CONFIG_JOYSTICK_SPACEBALL is not set
# CONFIG_JOYSTICK_STINGER is not set
# CONFIG_JOYSTICK_TWIDJOY is not set
# CONFIG_JOYSTICK_DB9 is not set
# CONFIG_JOYSTICK_GAMECON is not set
# CONFIG_JOYSTICK_TURBOGRAFX is not set
# CONFIG_JOYSTICK_JOYDUMP is not set
# CONFIG_JOYSTICK_XPAD is not set
# CONFIG_INPUT_TABLET is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
CONFIG_INPUT_MISC=y
CONFIG_INPUT_PCSPKR=m
# CONFIG_INPUT_APANEL is not set
# CONFIG_INPUT_ATLAS_BTNS is not set
# CONFIG_INPUT_ATI_REMOTE is not set
# CONFIG_INPUT_ATI_REMOTE2 is not set
# CONFIG_INPUT_KEYSPAN_REMOTE is not set
# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
CONFIG_INPUT_UINPUT=m

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=m
CONFIG_SERIO_CT82C710=m
CONFIG_SERIO_PARKBD=m
CONFIG_SERIO_PCIPS2=m
CONFIG_SERIO_LIBPS2=y
CONFIG_SERIO_RAW=m
CONFIG_GAMEPORT=m
CONFIG_GAMEPORT_NS558=m
# CONFIG_GAMEPORT_L4 is not set
# CONFIG_GAMEPORT_EMU10K1 is not set
# CONFIG_GAMEPORT_FM801 is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_NOZOMI is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_NR_UARTS=16
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
CONFIG_SERIAL_8250_RSA=y

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
CONFIG_PPDEV=m
CONFIG_IPMI_HANDLER=m
# CONFIG_IPMI_PANIC_EVENT is not set
CONFIG_IPMI_DEVICE_INTERFACE=m
CONFIG_IPMI_SI=m
CONFIG_IPMI_WATCHDOG=m
CONFIG_IPMI_POWEROFF=m
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_INTEL=m
# CONFIG_HW_RANDOM_AMD is not set
CONFIG_NVRAM=m
CONFIG_RTC=y
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
CONFIG_RAW_DRIVER=m
CONFIG_MAX_RAW_DEVS=256
CONFIG_HPET=y
# CONFIG_HPET_RTC_IRQ is not set
CONFIG_HPET_MMAP=y
CONFIG_HANGCHECK_TIMER=m
# CONFIG_TCG_TPM is not set
CONFIG_TELCLOCK=m
CONFIG_DEVPORT=y
CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=m

#
# I2C Algorithms
#
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_ALGOPCF=m
CONFIG_I2C_ALGOPCA=m

#
# I2C Hardware Bus support
#
CONFIG_I2C_ALI1535=m
CONFIG_I2C_ALI1563=m
CONFIG_I2C_ALI15X3=m
CONFIG_I2C_AMD756=m
CONFIG_I2C_AMD756_S4882=m
CONFIG_I2C_AMD8111=m
CONFIG_I2C_I801=m
CONFIG_I2C_I810=m
CONFIG_I2C_PIIX4=m
CONFIG_I2C_NFORCE2=m
CONFIG_I2C_OCORES=m
CONFIG_I2C_PARPORT=m
CONFIG_I2C_PARPORT_LIGHT=m
CONFIG_I2C_PROSAVAGE=m
CONFIG_I2C_SAVAGE4=m
CONFIG_I2C_SIMTEC=m
CONFIG_I2C_SIS5595=m
CONFIG_I2C_SIS630=m
CONFIG_I2C_SIS96X=m
# CONFIG_I2C_TAOS_EVM is not set
CONFIG_I2C_STUB=m
CONFIG_I2C_TINY_USB=m
CONFIG_I2C_VIA=m
CONFIG_I2C_VIAPRO=m
CONFIG_I2C_VOODOO3=m

#
# Miscellaneous I2C Chip support
#
CONFIG_DS1682=m
CONFIG_SENSORS_EEPROM=m
CONFIG_SENSORS_PCF8574=m
# CONFIG_PCF8575 is not set
CONFIG_SENSORS_PCF8591=m
# CONFIG_TPS65010 is not set
CONFIG_SENSORS_MAX6875=m
CONFIG_SENSORS_TSL2550=m
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set

#
# SPI support
#
# CONFIG_SPI is not set
# CONFIG_SPI_MASTER is not set
# CONFIG_W1 is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_BATTERY_DS2760 is not set
CONFIG_HWMON=y
CONFIG_HWMON_VID=m
CONFIG_SENSORS_ABITUGURU=m
CONFIG_SENSORS_ABITUGURU3=m
CONFIG_SENSORS_AD7418=m
CONFIG_SENSORS_ADM1021=m
CONFIG_SENSORS_ADM1025=m
CONFIG_SENSORS_ADM1026=m
CONFIG_SENSORS_ADM1029=m
CONFIG_SENSORS_ADM1031=m
CONFIG_SENSORS_ADM9240=m
CONFIG_SENSORS_ADT7470=m
CONFIG_SENSORS_K8TEMP=m
CONFIG_SENSORS_ASB100=m
CONFIG_SENSORS_ATXP1=m
CONFIG_SENSORS_DS1621=m
CONFIG_SENSORS_I5K_AMB=m
CONFIG_SENSORS_F71805F=m
CONFIG_SENSORS_F71882FG=m
CONFIG_SENSORS_F75375S=m
CONFIG_SENSORS_FSCHER=m
CONFIG_SENSORS_FSCPOS=m
CONFIG_SENSORS_FSCHMD=m
CONFIG_SENSORS_GL518SM=m
CONFIG_SENSORS_GL520SM=m
CONFIG_SENSORS_CORETEMP=m
CONFIG_SENSORS_IBMPEX=m
CONFIG_SENSORS_IT87=m
CONFIG_SENSORS_LM63=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_LM77=m
CONFIG_SENSORS_LM78=m
CONFIG_SENSORS_LM80=m
CONFIG_SENSORS_LM83=m
CONFIG_SENSORS_LM85=m
CONFIG_SENSORS_LM87=m
CONFIG_SENSORS_LM90=m
CONFIG_SENSORS_LM92=m
CONFIG_SENSORS_LM93=m
CONFIG_SENSORS_MAX1619=m
CONFIG_SENSORS_MAX6650=m
CONFIG_SENSORS_PC87360=m
CONFIG_SENSORS_PC87427=m
CONFIG_SENSORS_SIS5595=m
CONFIG_SENSORS_DME1737=m
CONFIG_SENSORS_SMSC47M1=m
CONFIG_SENSORS_SMSC47M192=m
CONFIG_SENSORS_SMSC47B397=m
# CONFIG_SENSORS_ADS7828 is not set
CONFIG_SENSORS_THMC50=m
CONFIG_SENSORS_VIA686A=m
CONFIG_SENSORS_VT1211=m
CONFIG_SENSORS_VT8231=m
CONFIG_SENSORS_W83781D=m
CONFIG_SENSORS_W83791D=m
CONFIG_SENSORS_W83792D=m
CONFIG_SENSORS_W83793=m
CONFIG_SENSORS_W83L785TS=m
# CONFIG_SENSORS_W83L786NG is not set
CONFIG_SENSORS_W83627HF=m
CONFIG_SENSORS_W83627EHF=m
CONFIG_SENSORS_HDAPS=m
CONFIG_SENSORS_APPLESMC=m
# CONFIG_HWMON_DEBUG_CHIP is not set
CONFIG_THERMAL=y
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set

#
# Watchdog Device Drivers
#
CONFIG_SOFT_WATCHDOG=m
CONFIG_ACQUIRE_WDT=m
CONFIG_ADVANTECH_WDT=m
CONFIG_ALIM1535_WDT=m
CONFIG_ALIM7101_WDT=m
CONFIG_SC520_WDT=m
CONFIG_EUROTECH_WDT=m
CONFIG_IB700_WDT=m
CONFIG_IBMASR=m
CONFIG_WAFER_WDT=m
CONFIG_I6300ESB_WDT=m
CONFIG_ITCO_WDT=m
# CONFIG_ITCO_VENDOR_SUPPORT is not set
# CONFIG_IT8712F_WDT is not set
CONFIG_SC1200_WDT=m
CONFIG_PC87413_WDT=m
CONFIG_60XX_WDT=m
CONFIG_SBC8360_WDT=m
CONFIG_CPU5_WDT=m
CONFIG_SMSC37B787_WDT=m
CONFIG_W83627HF_WDT=m
CONFIG_W83697HF_WDT=m
CONFIG_W83877F_WDT=m
CONFIG_W83977F_WDT=m
CONFIG_MACHZ_WDT=m
CONFIG_SBC_EPX_C3_WATCHDOG=m

#
# PCI-based Watchdog Cards
#
CONFIG_PCIPCWATCHDOG=m
CONFIG_WDTPCI=m
CONFIG_WDT_501_PCI=y

#
# USB-based Watchdog Cards
#
CONFIG_USBPCWATCHDOG=m

#
# Sonics Silicon Backplane
#
CONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not set

#
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set

#
# Multimedia devices
#
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L1=y
CONFIG_VIDEO_V4L1_COMPAT=y
CONFIG_VIDEO_V4L2=y
# CONFIG_VIDEO_CAPTURE_DRIVERS is not set
# CONFIG_RADIO_ADAPTERS is not set
# CONFIG_DVB_CORE is not set
# CONFIG_DAB is not set

#
# Graphics support
#
CONFIG_AGP=y
CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=m
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_VIA is not set
CONFIG_DRM=m
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
CONFIG_DRM_I810=m
CONFIG_DRM_I830=m
CONFIG_DRM_I915=m
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
CONFIG_VGASTATE=m
CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_FB=y
CONFIG_FIRMWARE_EDID=y
CONFIG_FB_DDC=m
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
CONFIG_FB_SYS_FILLRECT=y
CONFIG_FB_SYS_COPYAREA=y
CONFIG_FB_SYS_IMAGEBLIT=y
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_MACMODES is not set
# CONFIG_FB_BACKLIGHT is not set
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y

#
# Frame buffer hardware drivers
#
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
CONFIG_FB_VGA16=m
# CONFIG_FB_UVESA is not set
CONFIG_FB_VESA=y
# CONFIG_FB_EFI is not set
# CONFIG_FB_HECUBA is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_LE80578 is not set
CONFIG_FB_INTEL=m
# CONFIG_FB_INTEL_DEBUG is not set
CONFIG_FB_INTEL_I2C=y
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_GEODE is not set
CONFIG_FB_VIRTUAL=y
CONFIG_BACKLIGHT_LCD_SUPPORT=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_CORGI is not set
CONFIG_BACKLIGHT_PROGEAR=m

#
# Display device support
#
CONFIG_DISPLAY_SUPPORT=m

#
# Display hardware drivers
#

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_VIDEO_SELECT=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_LOGO is not set

#
# Sound
#
CONFIG_SOUND=m

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_RTCTIMER=m
CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
# CONFIG_SND_DYNAMIC_MINORS is not set
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

#
# Generic devices
#
CONFIG_SND_MPU401_UART=m
CONFIG_SND_DUMMY=m
CONFIG_SND_VIRMIDI=m
CONFIG_SND_MTPAV=m
CONFIG_SND_MTS64=m
CONFIG_SND_SERIAL_U16550=m
CONFIG_SND_MPU401=m
CONFIG_SND_PORTMAN2X4=m

#
# PCI devices
#
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS300 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_OXYGEN is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS5530 is not set
# CONFIG_SND_DARLA20 is not set
# CONFIG_SND_GINA20 is not set
# CONFIG_SND_LAYLA20 is not set
# CONFIG_SND_DARLA24 is not set
# CONFIG_SND_GINA24 is not set
# CONFIG_SND_LAYLA24 is not set
# CONFIG_SND_MONA is not set
# CONFIG_SND_MIA is not set
# CONFIG_SND_ECHO3G is not set
# CONFIG_SND_INDIGO is not set
# CONFIG_SND_INDIGOIO is not set
# CONFIG_SND_INDIGODJ is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_FM801 is not set
CONFIG_SND_HDA_INTEL=m
# CONFIG_SND_HDA_HWDEP is not set
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
CONFIG_SND_HDA_CODEC_ATIHDMI=y
CONFIG_SND_HDA_CODEC_CONEXANT=y
CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
# CONFIG_SND_HDA_POWER_SAVE is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_HIFIER is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_PCXHR is not set
# CONFIG_SND_RIPTIDE is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VIRTUOSO is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_YMFPCI is not set

#
# USB devices
#
CONFIG_SND_USB_AUDIO=m
# CONFIG_SND_USB_USX2Y is not set
# CONFIG_SND_USB_CAIAQ is not set

#
# System on Chip audio support
#
# CONFIG_SND_SOC is not set

#
# SoC Audio support for SuperH
#

#
# ALSA SoC audio for Freescale SOCs
#

#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=m
# CONFIG_HID_DEBUG is not set
# CONFIG_HIDRAW is not set

#
# USB Input Devices
#
CONFIG_USB_HID=m
CONFIG_USB_HIDINPUT_POWERBOOK=y
# CONFIG_HID_FF is not set
CONFIG_USB_HIDDEV=y

#
# USB HID Boot Protocol drivers
#
CONFIG_USB_KBD=m
CONFIG_USB_MOUSE=m
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_DYNAMIC_MINORS is not set
CONFIG_USB_SUSPEND=y
# CONFIG_USB_PERSIST is not set
# CONFIG_USB_OTG is not set

#
# USB Host Controller Drivers
#
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_ROOT_HUB_TT=y
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
# CONFIG_USB_ISP116X_HCD is not set
CONFIG_USB_OHCI_HCD=m
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=m
CONFIG_USB_SL811_HCD=m
# CONFIG_USB_R8A66597_HCD is not set

#
# USB Device Class drivers
#
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m

#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#

#
# may also be needed; see USB_STORAGE Help for more information
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
CONFIG_USB_STORAGE_USBAT=y
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_LIBUSUAL is not set

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
CONFIG_USB_MON=y

#
# USB port drivers
#
CONFIG_USB_USS720=m
# CONFIG_USB_SERIAL is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_BERRY_CHARGE is not set
CONFIG_USB_LED=m
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_PHIDGET is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
CONFIG_USB_SISUSBVGA=m
CONFIG_USB_SISUSBVGA_CON=y
CONFIG_USB_LD=m
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
CONFIG_USB_TEST=m
# CONFIG_USB_GADGET is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=m

#
# LED drivers
#
# CONFIG_LEDS_CLEVO_MAIL is not set

#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=m
CONFIG_LEDS_TRIGGER_IDE_DISK=y
CONFIG_LEDS_TRIGGER_HEARTBEAT=m
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
CONFIG_RTC_LIB=m
CONFIG_RTC_CLASS=m

#
# Conflicting RTC option has been selected, check GEN_RTC and RTC
#

#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set

#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set

#
# SPI RTC drivers
#

#
# Platform RTC drivers
#
CONFIG_RTC_DRV_CMOS=m
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_V3020 is not set

#
# on-CPU RTC drivers
#
# CONFIG_DMADEVICES is not set
# CONFIG_AUXDISPLAY is not set

#
# Userspace I/O
#
# CONFIG_UIO is not set

#
# Firmware Drivers
#
CONFIG_EDD=m
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
CONFIG_DMIID=y

#
# File systems
#
CONFIG_EXT2_FS=m
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=m
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
# CONFIG_EXT4DEV_FS is not set
CONFIG_JBD=m
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=m
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_QUOTA=y
# CONFIG_QUOTA_NETLINK_INTERFACE is not set
CONFIG_PRINT_QUOTA_WARNING=y
CONFIG_QFMT_V1=m
CONFIG_QFMT_V2=m
CONFIG_QUOTACTL=y
CONFIG_AUTOFS_FS=m
CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
CONFIG_GENERIC_ACL=y

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
CONFIG_NTFS_RW=y

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_CONFIGFS_FS=m

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
CONFIG_ECRYPT_FS=m
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
CONFIG_JFFS2_FS=m
CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_FS_WRITEBUFFER=y
# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
# CONFIG_JFFS2_SUMMARY is not set
CONFIG_JFFS2_FS_XATTR=y
CONFIG_JFFS2_FS_POSIX_ACL=y
CONFIG_JFFS2_FS_SECURITY=y
# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
CONFIG_JFFS2_ZLIB=y
# CONFIG_JFFS2_LZO is not set
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
CONFIG_ROMFS_FS=m
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_DIRECTIO=y
# CONFIG_NFSD is not set
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=m
CONFIG_SUNRPC_GSS=m
CONFIG_SUNRPC_BIND34=y
CONFIG_RPCSEC_GSS_KRB5=m
CONFIG_RPCSEC_GSS_SPKM3=m
# CONFIG_SMB_FS is not set
CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
# CONFIG_CIFS_XATTR is not set
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_EXPERIMENTAL is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
# CONFIG_MAC_PARTITION is not set
CONFIG_MSDOS_PARTITION=y
CONFIG_BSD_DISKLABEL=y
CONFIG_MINIX_SUBPARTITION=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
CONFIG_LDM_PARTITION=y
# CONFIG_LDM_DEBUG is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
# CONFIG_EFI_PARTITION is not set
# CONFIG_SYSV68_PARTITION is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=m
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
CONFIG_NLS_CODEPAGE_850=m
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
CONFIG_NLS_ASCII=m
CONFIG_NLS_ISO8859_1=m
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=m
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=m
CONFIG_DLM=m
CONFIG_DLM_DEBUG=y

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
# CONFIG_PRINTK_TIME is not set
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_UNUSED_SYMBOLS=y
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_PROVE_LOCKING is not set
# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set
CONFIG_FRAME_POINTER=y
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_FAULT_INJECTION is not set
CONFIG_LATENCYTOP=y
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_SAMPLES is not set
CONFIG_EARLY_PRINTK=y
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_DEBUG_PER_CPU_MAPS is not set
# CONFIG_DEBUG_RODATA is not set
# CONFIG_DEBUG_NX_TEST is not set
CONFIG_X86_MPPARSE=y
# CONFIG_IOMMU_DEBUG is not set
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEFAULT_IO_DELAY_TYPE=0
# CONFIG_DEBUG_BOOT_PARAMS is not set
# CONFIG_CPA_DEBUG is not set

#
# Security options
#
CONFIG_KEYS=y
# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
CONFIG_SECURITY=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_NETWORK_XFRM=y
CONFIG_SECURITY_CAPABILITIES=y
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
# CONFIG_SECURITY_ROOTPLUG is not set
CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
CONFIG_SECURITY_SELINUX_DISABLE=y
CONFIG_SECURITY_SELINUX_DEVELOP=y
CONFIG_SECURITY_SELINUX_AVC_STATS=y
CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
# CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set
# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
CONFIG_XOR_BLOCKS=m
CONFIG_ASYNC_CORE=m
CONFIG_ASYNC_MEMCPY=m
CONFIG_ASYNC_XOR=m
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_AEAD=m
CONFIG_CRYPTO_BLKCIPHER=m
# CONFIG_CRYPTO_SEQIV is not set
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_XCBC=m
CONFIG_CRYPTO_NULL=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_TGR192=m
CONFIG_CRYPTO_GF128MUL=m
CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=m
CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_XTS=m
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_DES=m
CONFIG_CRYPTO_FCRYPT=m
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_TWOFISH_COMMON=m
CONFIG_CRYPTO_TWOFISH_X86_64=m
CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_AES_X86_64=m
CONFIG_CRYPTO_CAST5=m
CONFIG_CRYPTO_CAST6=m
CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_ARC4=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_SEED=m
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_X86_64 is not set
CONFIG_CRYPTO_DEFLATE=m
CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_TEST=m
CONFIG_CRYPTO_AUTHENC=m
# CONFIG_CRYPTO_LZO is not set
# CONFIG_CRYPTO_HW is not set
CONFIG_HAVE_KVM=y
# CONFIG_VIRTUALIZATION is not set

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_CRC_CCITT=m
CONFIG_CRC16=m
CONFIG_CRC_ITU_T=m
CONFIG_CRC32=y
CONFIG_CRC7=m
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=m
CONFIG_ZLIB_DEFLATE=m
CONFIG_REED_SOLOMON=m
CONFIG_REED_SOLOMON_DEC16=y
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=m
CONFIG_TEXTSEARCH_BM=m
CONFIG_TEXTSEARCH_FSM=m
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y

^ permalink raw reply

* Re: RESEND, HTB(?) softlockup, vanilla 2.6.24
From: Jarek Poplawski @ 2008-02-17  9:11 UTC (permalink / raw)
  To: Denys Fedoryshchenko; +Cc: netdev
In-Reply-To: <20080216235419.M80874@visp.net.lb>

On Sun, Feb 17, 2008 at 02:03:33AM +0200, Denys Fedoryshchenko wrote:
> Server is fully redundant now, so i apply patches (but i apply both, probably 
> it will make system more reliable somehow) and i enable required debug 
> options in kernel. So i will try to catch this bug few more times, probably 
> if it will generate more detailed info over netconsole it will be useful.

I guess you mean the patches mentioned in the "BUG/ spinlock lockup";
they could be useful, but we are not sure this is the same problem.
Anyway, if there are really stack overflows then we don't need any
bug report after this: with stack data corrupted they would show some
"false" problems. We need to find which code overflows and why. If you
want to debug this, then try to make this more reproducible e.g. with
CONFIG_4KSTACKS; anyway you should always turn on these options with
such problems: CONFIG_DEBUG_STACKOVERFLOW CONFIG_DEBUG_STACK_USAGE.

> Is there any project to dump console messages/kernel dump to disk? For 
...
I don't know, but there is probably something better: a project by
Intel to save this in some cpu memory (or something...). But again:
we don't need corrupted messages after stack overflow, and, if we
don't let for this, maybe these netconsole messages would be properly
printed and quite enough...

> I notice some code in MTD(CONFIG_MTD_OOPS), but i am not sure it is correct 
> and will work if i will setup MTD emulation for block device.

I'm not sure what do you mean by MTD emulation: it should be used with
MTD devices only, I presume?

Regards,
Jarek P.

PS: BTW, for HTB with actions I recommend my "sch_htb: htb_requeue fix",
available in 2.6.25-rc.

^ permalink raw reply

* [2.6 patch] remove include/linux/netfilter_ipv4/ipt_SAME.h
From: Adrian Bunk @ 2008-02-17  8:30 UTC (permalink / raw)
  To: Patrick McHardy, David S. Miller; +Cc: linux-kernel, netdev

This patch removes the no longer used include/linux/netfilter_ipv4/ipt_SAME.h

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 include/linux/netfilter_ipv4/Kbuild     |    1 -
 include/linux/netfilter_ipv4/ipt_SAME.h |   19 -------------------
 2 files changed, 20 deletions(-)

553bf355efd03581a094d8a4e0b278e04228aae8 diff --git a/include/linux/netfilter_ipv4/Kbuild b/include/linux/netfilter_ipv4/Kbuild
index 3a7105b..646d104 100644
--- a/include/linux/netfilter_ipv4/Kbuild
+++ b/include/linux/netfilter_ipv4/Kbuild
@@ -7,7 +7,6 @@ header-y += ipt_LOG.h
 header-y += ipt_MARK.h
 header-y += ipt_NFQUEUE.h
 header-y += ipt_REJECT.h
-header-y += ipt_SAME.h
 header-y += ipt_TCPMSS.h
 header-y += ipt_TOS.h
 header-y += ipt_TTL.h
diff --git a/include/linux/netfilter_ipv4/ipt_SAME.h b/include/linux/netfilter_ipv4/ipt_SAME.h
deleted file mode 100644
index be6e682..0000000
--- a/include/linux/netfilter_ipv4/ipt_SAME.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _IPT_SAME_H
-#define _IPT_SAME_H
-
-#define IPT_SAME_MAX_RANGE	10
-
-#define IPT_SAME_NODST		0x01
-
-struct ipt_same_info
-{
-	unsigned char info;
-	u_int32_t rangesize;
-	u_int32_t ipnum;
-	u_int32_t *iparray;
-
-	/* hangs off end. */
-	struct nf_nat_range range[IPT_SAME_MAX_RANGE];
-};
-
-#endif /*_IPT_SAME_H*/


^ permalink raw reply related

* Re: include/linux/pcounter.h
From: David Miller @ 2008-02-17  5:54 UTC (permalink / raw)
  To: akpm; +Cc: dada1, herbert, netdev, linux-kernel
In-Reply-To: <20080216112618.ec450f9b.akpm@linux-foundation.org>

From: Andrew Morton <akpm@linux-foundation.org>
Date: Sat, 16 Feb 2008 11:26:18 -0800

> On Sat, 16 Feb 2008 13:03:54 +0100 Eric Dumazet <dada1@cosmosbay.com> wrote:
> 
> > Yes, per connection basis. Some workloads want to open/close more than 1000 
> > sockets per second.
> 
> ie: slowpath

Definitely not slow path in the networking.

Connection rates are definitely as, or more, important than packet
rates for certain workloads.

^ permalink raw reply

* [PATHCH 0/16]  ServerEngines 10Gb NIC driver
From: Subbu Seetharaman @ 2008-02-17  3:51 UTC (permalink / raw)
  To: netdev

Patch 0/16 and 15/16 of this series are getting dropped by the
spam filter.  I am trying to get them across with changes
that will please the spam filter.  Sorry about the inconvenience.
Below is the 0/16 of the series.

--------------------------
Hi,


I am sending a patch for network driver for ServerEngines 10Gb Network adapter for review.  This patch includes the network driver and the OS neutral code that implements the interactions between the host drivers and the adapter. The adapter is a dual function device with network and storage functions.  The network driver is a regular NIC driver.  

The low level library that manages the interaction with the adapter is common to both storage and network drivers and hence is organized under the directory drivers/message/beclib. The storage driver is not part of this patch and will be submitted after this review.

This patch is made against 2.6.24.2 version of the kernel source.

Thank you.

Subbu Seetharaman

Signed-off-by: Subbu Seetharaman <subbus@serverengines.com>

------------------------

drivers/net/benet/be.h	                                            373
drivers/net/benet/bni.h	                                            374
drivers/net/benet/be_init.c                                        1426
drivers/net/benet/be_netif.c                                        600
drivers/net/benet/be_int.c                                         1254
drivers/net/benet/be_tx.c                                           191
drivers/net/benet/bni.c                                            1506
drivers/net/benet/be_ethtool.c                                      410
drivers/net/benet/be_proc.c                                         679
drivers/net/benet/Makefile                                           25
drivers/net/Kconfig                                                  15
drivers/net/Makefile                                                  1
MAINTAINERS                                                           6
drivers/message/beclib/pch.h                                         58
drivers/message/beclib/beclib_common.h                              111
drivers/message/beclib/beclib_ll.h                                  682
drivers/message/beclib/beclib_private_ll.h                          451
drivers/message/beclib/beclib_stats.h                                73
drivers/message/beclib/beclib_ll_enum_nic.h                          68
drivers/message/beclib/beclib_ll_bmap_nic.h                        1720
drivers/message/beclib/bestatus.h                                   129
drivers/message/beclib/beregister.h                                 366
drivers/message/beclib/main_ll.c                                     53
drivers/message/beclib/chipobj_ll.c                                 145
drivers/message/beclib/funcobj_ll.c                                2339
drivers/message/beclib/ethtx_ll.c                                    61
drivers/message/beclib/ethrx_ll.c                                   430
drivers/message/beclib/rxf_ll.c                                    1008
drivers/message/beclib/eq_ll.c                                      751
drivers/message/beclib/cq_ll.c                                      443
drivers/message/beclib/mpu_ll.c                                    1559
drivers/message/beclib/sa/setypes.h                                  70
drivers/message/beclib/sa/sa.c                                      278
drivers/message/beclib/sa/sa.h                                     1004
drivers/message/beclib/fw/amap/ioctl_opcodes.h                      812
drivers/message/beclib/fw/amap/ioctl_defs.h                         115
drivers/message/beclib/fw/amap/host_struct.h                        115
drivers/message/beclib/fw/amap/be_common.h                           86
drivers/message/beclib/fw/amap/ep.h                                  99
drivers/message/beclib/fw/amap/descriptors.h                        105
drivers/message/beclib/fw/amap/be_cm.h                              110
drivers/message/beclib/fw/amap/headers.h                             84
drivers/message/beclib/fw/amap/ioctl_top.h                           63
drivers/message/beclib/fw/amap/ioctl_types.h                        459
drivers/message/beclib/fw/amap/ioctl_common.h                       260
drivers/message/beclib/fw/amap/mpu_context.h                         56
drivers/message/beclib/fw/amap/ioctl_eth.h                           95
drivers/message/beclib/fw/amap/etx_context.h                         87
drivers/message/beclib/fw/amap/cev.h                                275
drivers/message/beclib/fw/amap/asyncmesg.h                           98
drivers/message/beclib/fw/amap/mpu.h                                107
drivers/message/beclib/fw/amap/doorbells.h                          211
drivers/message/beclib/fw/amap/ioctl_mcc.h                          128
drivers/message/beclib/fw/amap/ioctl_hdr.h                           58
drivers/message/beclib/fw/amap/regmap.h                             100
drivers/message/beclib/fw/amap/common_context.h                      73
drivers/message/beclib/fw/amap/post_codes.h                         127
drivers/message/beclib/fw/be_gen_id_ranges.h                        240
drivers/message/beclib/fw/bmap/ioctl_types_bmap.h                   521
drivers/message/beclib/fw/bmap/etx_context_bmap.h                   118
drivers/message/beclib/fw/bmap/host_struct_bmap.h                   254
drivers/message/beclib/fw/bmap/doorbells_bmap.h                     470
drivers/message/beclib/fw/bmap/mpu_bmap.h                           155
drivers/message/beclib/fw/bmap/asyncmesg_bmap.h                     158
drivers/message/beclib/fw/bmap/be_common_bmap.h                     150
drivers/message/beclib/fw/bmap/ioctl_common_bmap.h                 1398
drivers/message/beclib/fw/bmap/ep_bmap.h                            175
drivers/message/beclib/fw/bmap/cev_bmap.h                           552
drivers/message/beclib/fw/bmap/be_cm_bmap.h                         174
drivers/message/beclib/fw/bmap/iscsi_initiator_host_struct_bmap.h   642
drivers/message/beclib/fw/bmap/descriptors_bmap.h                   124
drivers/message/beclib/fw/bmap/regmap_bmap.h                        204
drivers/message/beclib/fw/bmap/ioctl_hdr_bmap.h                      87
drivers/message/beclib/fw/bmap/ioctl_top_bmap.h                      61
drivers/message/beclib/fw/bmap/pcicfg_bmap.h                       2333
drivers/message/beclib/fw/bmap/iscsi_common_host_struct_bmap.h      406
drivers/message/beclib/fw/bmap/mpu_context_bmap.h                   102
drivers/message/beclib/fw/bmap/ioctl_eth_bmap.h                     378
drivers/message/beclib/fw/bmap/ioctl_mcc_bmap.h                     113
drivers/message/beclib/fw/bmap/post_codes_bmap.h                    101

___________________________________________________________________________________
This message, together with any attachment(s), contains confidential and proprietary information of
ServerEngines Corporation and is intended only for the designated recipient(s) named above. Any unauthorized
review, printing, retention, copying, disclosure or distribution is strictly prohibited.  If you are not the
intended recipient of this message, please immediately advise the sender by reply email message and
delete all copies of this message and any attachment(s). Thank you.


^ permalink raw reply

* [PATHCH 16/16]  ServerEngines 10Gb NIC driver
From: Subbu Seetharaman @ 2008-02-17  3:36 UTC (permalink / raw)
  To: netdev

F/W header files.

-----------------------

diff -uprN orig/linux-2.6.24.2/drivers/message/beclib/fw/bmap/iscsi_common_host_struct_bmap.h benet/linux-2.6.24.2/drivers/message/beclib/fw/bmap/iscsi_common_host_struct_bmap.h
--- orig/linux-2.6.24.2/drivers/message/beclib/fw/bmap/iscsi_common_host_struct_bmap.h	1970-01-01 05:30:00.000000000 +0530
+++ benet/linux-2.6.24.2/drivers/message/beclib/fw/bmap/iscsi_common_host_struct_bmap.h	2008-02-14 15:23:07.840200872 +0530
@@ -0,0 +1,406 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or at your option any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor
+ * Boston, MA 02110-1301 USA
+ *
+ *
+ * The full GNU General Public License is included in this distribution
+ * in the file called GPL.
+ *
+ * Contact Information:
+ * linux-drivers@serverengines.com
+ *
+ * ServerEngines
+ * 209 N. Fair Oaks Ave
+ * Sunnyvale, CA 94085
+ */
+/*
+ * Autogenerated by srcgen version: 0127  */ #ifndef 
+__iscsi_common_host_struct_bmap_h__
+#define __iscsi_common_host_struct_bmap_h__
+#include "setypes.h"
+
+#undef SG_PACK
+#if defined(SG_PRAGMA_PACK)
+#pragma pack(push, 1)
+#define SG_PACK
+#elif defined(SG_ATTRIBUTE_PACK)
+#define SG_PACK __attribute__ ((packed)) #else #define SG_PACK #endif
+
+#ifndef SG_C_ASSERT
+#define SG_C_ASSERT(_name_, _condition_) #endif
+
+#if defined(__BIG_ENDIAN)
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_37_RSVD {
+	u32 rsvd1:10;		/* DWORD 0 */
+	u32 rsvd0:1;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_37_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_37_RSVD;
+
+#else
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_37_RSVD {
+	u32 rsvd0:1;		/* DWORD 0 */
+	u32 rsvd1:10;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_37_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_37_RSVD;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_38_RSVD {
+	u32 rsvd1:15;		/* DWORD 0 */
+	u32 rsvd0:1;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_38_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_38_RSVD;
+
+#else
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_38_RSVD {
+	u32 rsvd0:1;		/* DWORD 0 */
+	u32 rsvd1:15;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_38_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_38_RSVD;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+   /* Scatter gather element */
+typedef struct _ISCSI_SGE {
+	u32 addr_hi;		/* DWORD 0 */
+	u32 addr_lo;		/* DWORD 1 */
+	u32 last_sge:1;		/* DWORD 2 */
+	u32 rsvd0:11;		/* DWORD 2 */
+	u32 sge_offset:20;	/* DWORD 2 */
+	u32 rsvd1:16;		/* DWORD 3 */
+	u32 len:16;		/* DWORD 3 */
+} SG_PACK ISCSI_SGE, *PISCSI_SGE;
+
+#else
+   /* Scatter gather element */
+typedef struct _ISCSI_SGE {
+	u32 addr_hi;		/* DWORD 0 */
+	u32 addr_lo;		/* DWORD 1 */
+	u32 sge_offset:20;	/* DWORD 2 */
+	u32 rsvd0:11;		/* DWORD 2 */
+	u32 last_sge:1;		/* DWORD 2 */
+	u32 len:16;		/* DWORD 3 */
+	u32 rsvd1:16;		/* DWORD 3 */
+} SG_PACK ISCSI_SGE, *PISCSI_SGE;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+   /* Scatter gather element to DMA OOO segments */ typedef struct 
+_ISCSI_OOO_SGE {
+	u32 addr_hi;		/* DWORD 0 */
+	u32 addr_lo;		/* DWORD 1 */
+} SG_PACK ISCSI_OOO_SGE, *PISCSI_OOO_SGE;
+
+#else
+   /* Scatter gather element to DMA OOO segments */ typedef struct 
+_ISCSI_OOO_SGE {
+	u32 addr_hi;		/* DWORD 0 */
+	u32 addr_lo;		/* DWORD 1 */
+} SG_PACK ISCSI_OOO_SGE, *PISCSI_OOO_SGE;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_39_RSVD {
+	u32 rsvd1:2;		/* DWORD 0 */
+	u32 rsvd0:1;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_39_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_39_RSVD;
+
+#else
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_39_RSVD {
+	u32 rsvd0:1;		/* DWORD 0 */
+	u32 rsvd1:2;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_39_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_39_RSVD;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+   /* RRmsg sent from ARM to iSCSI TXULP and carried as body of IPC
+    * between EPs */
+typedef struct _ISCSI_RRMSG {
+	u32 invalidate_ref_handle:16;	/* DWORD 0 */
+	u32 rsvd0:3;		/* DWORD 0 */
+	u32 chuteid:1;		/* DWORD 0 */
+	u32 defpdu_invld:1;	/* DWORD 0 */
+	u32 sgl_icd_Index:11;	/* DWORD 0 */
+	u32 partialBytesSent:24;	/* DWORD 1 */
+	u32 upload:1;		/* DWORD 1 */
+	u32 rstonneed:1;	/* DWORD 1 */
+	u32 invld_resp:1;	/* DWORD 1 */
+	u32 wr:1;		/* DWORD 1 */
+	u32 iscsicon_rst:1;	/* DWORD 1 */
+	u32 icd_free:1;		/* DWORD 1 */
+	u32 icd_invld:1;	/* DWORD 1 */
+	u32 iscsicon_invld:1;	/* DWORD 1 */
+} SG_PACK ISCSI_RRMSG, *PISCSI_RRMSG;
+
+#else
+   /* RRmsg sent from ARM to iSCSI TXULP and carried as body of IPC
+    * between EPs */
+typedef struct _ISCSI_RRMSG {
+	u32 sgl_icd_Index:11;	/* DWORD 0 */
+	u32 defpdu_invld:1;	/* DWORD 0 */
+	u32 chuteid:1;		/* DWORD 0 */
+	u32 rsvd0:3;		/* DWORD 0 */
+	u32 invalidate_ref_handle:16;	/* DWORD 0 */
+	u32 iscsicon_invld:1;	/* DWORD 1 */
+	u32 icd_invld:1;	/* DWORD 1 */
+	u32 icd_free:1;		/* DWORD 1 */
+	u32 iscsicon_rst:1;	/* DWORD 1 */
+	u32 wr:1;		/* DWORD 1 */
+	u32 invld_resp:1;	/* DWORD 1 */
+	u32 rstonneed:1;	/* DWORD 1 */
+	u32 upload:1;		/* DWORD 1 */
+	u32 partialBytesSent:24;	/* DWORD 1 */
+} SG_PACK ISCSI_RRMSG, *PISCSI_RRMSG;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+   /* Full 8 byte LUN. */
+typedef struct _ISCSI_LUN {
+	u8 bytes[8];
+} SG_PACK ISCSI_LUN, *PISCSI_LUN;
+
+#else
+   /* Full 8 byte LUN. */
+typedef struct _ISCSI_LUN {
+	u8 bytes[8];
+} SG_PACK ISCSI_LUN, *PISCSI_LUN;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_40_RSVD {
+	u32 rsvd1:2;		/* DWORD 0 */
+	u32 rsvd0:1;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_40_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_40_RSVD;
+
+#else
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_40_RSVD {
+	u32 rsvd0:1;		/* DWORD 0 */
+	u32 rsvd1:2;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_40_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_40_RSVD;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_41_RSVD {
+	u32 rsvd1:7;		/* DWORD 0 */
+	u32 rsvd0:1;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_41_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_41_RSVD;
+
+#else
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_41_RSVD {
+	u32 rsvd0:1;		/* DWORD 0 */
+	u32 rsvd1:7;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_41_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_41_RSVD;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_42_RSVD {
+	u32 rsvd1:2;		/* DWORD 0 */
+	u32 rsvd0:1;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_42_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_42_RSVD;
+
+#else
+
+typedef struct _ISCSI_COMMON_HOST_STRUCT_ANON_42_RSVD {
+	u32 rsvd0:1;		/* DWORD 0 */
+	u32 rsvd1:2;		/* DWORD 0 */
+} SG_PACK ISCSI_COMMON_HOST_STRUCT_ANON_42_RSVD,
+    *PISCSI_COMMON_HOST_STRUCT_ANON_42_RSVD;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+   /* ISCSI Default PDU Context latest */ typedef struct 
+_ISCSI_DEFAULT_PDU_CONTEXT {
+	u32 rsvd1:8;		/* DWORD 0 */
+	u32 ring_size:4;	/* DWORD 0 */
+	u32 ring_state:4;	/* DWORD 0 */
+	u32 rsvd0:3;		/* DWORD 0 */
+	u32 dbuf_cindex:13;	/* DWORD 0 */
+	u32 cq_id_recv:10;	/* DWORD 1 */
+	u32 rx_pdid_not_valid:1;	/* DWORD 1 */
+	u32 rx_pdid:5;		/* DWORD 1 */
+	u32 rsvd2:3;		/* DWORD 1 */
+	u32 dbuf_pindex:13;	/* DWORD 1 */
+	u32 rsvd3:16;		/* DWORD 2 */
+	u32 default_buffer_size:16;	/* DWORD 2 */
+	u32 rsvd4[1];		/* DWORDS 3 to 3 */
+} SG_PACK ISCSI_DEFAULT_PDU_CONTEXT, *PISCSI_DEFAULT_PDU_CONTEXT;
+
+#else
+   /* ISCSI Default PDU Context latest */ typedef struct 
+_ISCSI_DEFAULT_PDU_CONTEXT {
+	u32 dbuf_cindex:13;	/* DWORD 0 */
+	u32 rsvd0:3;		/* DWORD 0 */
+	u32 ring_state:4;	/* DWORD 0 */
+	u32 ring_size:4;	/* DWORD 0 */
+	u32 rsvd1:8;		/* DWORD 0 */
+	u32 dbuf_pindex:13;	/* DWORD 1 */
+	u32 rsvd2:3;		/* DWORD 1 */
+	u32 rx_pdid:5;		/* DWORD 1 */
+	u32 rx_pdid_not_valid:1;	/* DWORD 1 */
+	u32 cq_id_recv:10;	/* DWORD 1 */
+	u32 default_buffer_size:16;	/* DWORD 2 */
+	u32 rsvd3:16;		/* DWORD 2 */
+	u32 rsvd4[1];		/* DWORDS 3 to 3 */
+} SG_PACK ISCSI_DEFAULT_PDU_CONTEXT, *PISCSI_DEFAULT_PDU_CONTEXT;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+   /*
+    *  This is the ring context structure for iSCSI only, because of its
+    *  special linked  list structure. The HLL and h are used only by
+    *  btlr to track the list. When  receiving a driver request, that
+    *  is, the driver request bit is set in the  TCPSCH_PROC_IQ_DATA
+    *  descriptor from TCP Scheduler, iSCSI TXULP will double check the
+    *   wrb_pend to make sure it is greater than zero, and then use the
+    *  wrb_addr as the  address of pending WRB and use it to generate
+    *  CRA for UC request. After completing  the current WRB, the iSCSI
+    *  RXULP will send the ptr2NxtWRB to the CEV.
+    */
+typedef struct _RING_CONTEXT_ISCSI {
+	u32 rsvd1:16;		/* DWORD 0 */
+	u32 hll:8;		/* DWORD 0 */
+	u32 rsvd0:7;		/* DWORD 0 */
+	u32 h:1;		/* DWORD 0 */
+	u32 rsvd2:10;		/* DWORD 1 */
+	u32 o:1;		/* DWORD 1 */
+	u32 pdid:5;		/* DWORD 1 */
+	u32 wrb_pend:8;		/* DWORD 1 */
+	u32 wrb_addr:8;		/* DWORD 1 */
+} SG_PACK RING_CONTEXT_ISCSI, *PRING_CONTEXT_ISCSI;
+
+#else
+   /*
+    *  This is the ring context structure for iSCSI only, because of its
+    *  special linked  list structure. The HLL and h are used only by
+    *  btlr to track the list. When  receiving a driver request, that
+    *  is, the driver request bit is set in the  TCPSCH_PROC_IQ_DATA
+    *  descriptor from TCP Scheduler, iSCSI TXULP will double check the
+    *   wrb_pend to make sure it is greater than zero, and then use the
+    *  wrb_addr as the  address of pending WRB and use it to generate
+    *  CRA for UC request. After completing  the current WRB, the iSCSI
+    *  RXULP will send the ptr2NxtWRB to the CEV.
+    */
+typedef struct _RING_CONTEXT_ISCSI {
+	u32 h:1;		/* DWORD 0 */
+	u32 rsvd0:7;		/* DWORD 0 */
+	u32 hll:8;		/* DWORD 0 */
+	u32 rsvd1:16;		/* DWORD 0 */
+	u32 wrb_addr:8;		/* DWORD 1 */
+	u32 wrb_pend:8;		/* DWORD 1 */
+	u32 pdid:5;		/* DWORD 1 */
+	u32 o:1;		/* DWORD 1 */
+	u32 rsvd2:10;		/* DWORD 1 */
+} SG_PACK RING_CONTEXT_ISCSI, *PRING_CONTEXT_ISCSI;
+
+#endif
+
+#if defined(__BIG_ENDIAN)
+   /*
+    *  This is the ring context structure for iSCSI only, because of its
+    *  special linked  list structure. The HLL and h are used only by
+    *  btlr to track the list. When  receiving a driver request, that
+    *  is, the driver request bit is set in the  TCPSCH_PROC_IQ_DATA
+    *  descriptor from TCP Scheduler, iSCSI TXULP will double check the
+    *   wrb_pend to make sure it is greater than zero, and then use the
+    *  wrb_addr as the  address of pending WRB and use it to generate
+    *  CRA for UC request. After completing  the current WRB, the iSCSI
+    *  RXULP will send the ptr2NxtWRB to the CEV.
+    */
+typedef struct _RING_CONTEXT_ISCSI_BE2 {
+	u32 r2t_cidx:10;	/* DWORD 0 */
+	u32 fetch_r2t:1;	/* DWORD 0 */
+	u32 fetch_wrb:1;	/* DWORD 0 */
+	u32 tx_ring_size:4;	/* DWORD 0 */
+	u32 hll:8;		/* DWORD 0 */
+	u32 wrb_addr:8;		/* DWORD 0 */
+	u32 ctx_valid:1;	/* DWORD 1 */
+	u32 pdid:9;		/* DWORD 1 */
+	u32 pci_func_id:8;	/* DWORD 1 */
+	u32 rsvd0:5;		/* DWORD 1 */
+	u32 h:1;		/* DWORD 1 */
+	u32 wrb_pend:8;		/* DWORD 1 */
+} SG_PACK RING_CONTEXT_ISCSI_BE2, *PRING_CONTEXT_ISCSI_BE2;
+
+#else
+   /*
+    *  This is the ring context structure for iSCSI only, because of its
+    *  special linked  list structure. The HLL and h are used only by
+    *  btlr to track the list. When  receiving a driver request, that
+    *  is, the driver request bit is set in the  TCPSCH_PROC_IQ_DATA
+    *  descriptor from TCP Scheduler, iSCSI TXULP will double check the
+    *   wrb_pend to make sure it is greater than zero, and then use the
+    *  wrb_addr as the  address of pending WRB and use it to generate
+    *  CRA for UC request. After completing  the current WRB, the iSCSI
+    *  RXULP will send the ptr2NxtWRB to the CEV.
+    */
+typedef struct _RING_CONTEXT_ISCSI_BE2 {
+	u32 wrb_addr:8;		/* DWORD 0 */
+	u32 hll:8;		/* DWORD 0 */
+	u32 tx_ring_size:4;	/* DWORD 0 */
+	u32 fetch_wrb:1;	/* DWORD 0 */
+	u32 fetch_r2t:1;	/* DWORD 0 */
+	u32 r2t_cidx:10;	/* DWORD 0 */
+	u32 wrb_pend:8;		/* DWORD 1 */
+	u32 h:1;		/* DWORD 1 */
+	u32 rsvd0:5;		/* DWORD 1 */
+	u32 pci_func_id:8;	/* DWORD 1 */
+	u32 pdid:9;		/* DWORD 1 */
+	u32 ctx_valid:1;	/* DWORD 1 */
+} SG_PACK RING_CONTEXT_ISCSI_BE2, *PRING_CONTEXT_ISCSI_BE2;
+
+#endif
+
+#ifdef SG_PRAGMA_PACK
+#pragma pack(pop)
+#endif
+
+#endif /* __iscsi_common_host_struct_bmap_h__ */
diff -uprN orig/linux-2.6.24.2/drivers/message/beclib/fw/bmap/mpu_context_bmap.h benet/linux-2.6.24.2/drivers/message/beclib/fw/bmap/mpu_context_bmap.h
--- orig/linux-2.6.24.2/drivers/message/beclib/fw/bmap/mpu_context_bmap.h	1970-01-01 05:30:00.000000000 +0530
+++ benet/linux-2.6.24.2/drivers/message/beclib/fw/bmap/mpu_context_bmap.h	2008-02-14 15:23:07.841200720 +0530
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or at your option any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor
+ * Boston, MA 02110-1301 USA
+ *
+ *
+ * The full GNU General Public License is included in this distribution
+ * in the file called GPL.
+ *
+ * Contact Information:
+ * linux-drivers@serverengines.com
+ *
+ * ServerEngines
+ * 209 N. Fair Oaks Ave
+ * Sunnyvale, CA 94085
+ */
+/*
+ * Autogenerated by srcgen version: 0127  */ #ifndef 
+__mpu_context_bmap_h__ #define __mpu_context_bmap_h__ #include 
+"setypes.h"
+
+#undef SG_PACK
+#if defined(SG_PRAGMA_PACK)
+#pragma pack(push, 1)
+#define SG_PACK
+#elif defined(SG_ATTRIBUTE_PACK)
+#define SG_PACK __attribute__ ((packed)) #else #define SG_PACK #endif
+
+#ifndef SG_C_ASSERT
+#define SG_C_ASSERT(_name_, _condition_) #endif
+
+#if defined(__BIG_ENDIAN)
+   /*
+    *  Management command and control ring context. The MPUs BTLR_CTRL1
+    *  CSR controls the  writeback behavior of the producer and consumer
+    *  index values.
+    */
+typedef struct _MCC_RING_CONTEXT {
+	u32 rsvd0:1;		/* DWORD 0 */
+	u32 cq_id:11;		/* DWORD 0 */
+	u32 ring_size:4;	/* DWORD 0 */
+	u32 con_index:16;	/* DWORD 0 */
+	u32 invalid:1;		/* DWORD 1 */
+	u32 pdid:15;		/* DWORD 1 */
+	u32 prod_index:16;	/* DWORD 1 */
+	u32 rsvd1:25;		/* DWORD 2 */
+	u32 cmd_pending_current:7;	/* DWORD 2 */
+	u32 rsvd3:9;		/* DWORD 3 */
+	u32 cmd_pending_max:7;	/* DWORD 3 */
+	u32 rsvd2:5;		/* DWORD 3 */
+	u32 hpi_port_cq_id:11;	/* DWORD 3 */
+} SG_PACK MCC_RING_CONTEXT, *PMCC_RING_CONTEXT;
+
+#else
+   /*
+    *  Management command and control ring context. The MPUs BTLR_CTRL1
+    *  CSR controls the  writeback behavior of the producer and consumer
+    *  index values.
+    */
+typedef struct _MCC_RING_CONTEXT {
+	u32 con_index:16;	/* DWORD 0 */
+	u32 ring_size:4;	/* DWORD 0 */
+	u32 cq_id:11;		/* DWORD 0 */
+	u32 rsvd0:1;		/* DWORD 0 */
+	u32 prod_index:16;	/* DWORD 1 */
+	u32 pdid:15;		/* DWORD 1 */
+	u32 invalid:1;		/* DWORD 1 */
+	u32 cmd_pending_current:7;	/* DWORD 2 */
+	u32 rsvd1:25;		/* DWORD 2 */
+	u32 hpi_port_cq_id:11;	/* DWORD 3 */
+	u32 rsvd2:5;		/* DWORD 3 */
+	u32 cmd_pending_max:7;	/* DWORD 3 */
+	u32 rsvd3:9;		/* DWORD 3 */
+} SG_PACK MCC_RING_CONTEXT, *PMCC_RING_CONTEXT;
+
+#endif
+
+#ifdef SG_PRAGMA_PACK
+#pragma pack(pop)
+#endif
+
+#endif /* __mpu_context_bmap_h__ */
diff -uprN orig/linux-2.6.24.2/drivers/message/beclib/fw/bmap/ioctl_eth_bmap.h benet/linux-2.6.24.2/drivers/message/beclib/fw/bmap/ioctl_eth_bmap.h
--- orig/linux-2.6.24.2/drivers/message/beclib/fw/bmap/ioctl_eth_bmap.h	1970-01-01 05:30:00.000000000 +0530
+++ benet/linux-2.6.24.2/drivers/message/beclib/fw/bmap/ioctl_eth_bmap.h	2008-02-14 15:23:07.841200720 +0530
@@ -0,0 +1,378 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or at your option any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor
+ * Boston, MA 02110-1301 USA
+ *
+ *
+ * The full GNU General Public License is included in this distribution
+ * in the file called GPL.
+ *
+ * Contact Information:
+ * linux-drivers@serverengines.com
+ *
+ * ServerEngines
+ * 209 N. Fair Oaks Ave
+ * Sunnyvale, CA 94085
+ */
+/*
+ * Autogenerated by srcgen version: 0127  */ #ifndef 
+__ioctl_eth_bmap_h__ #define __ioctl_eth_bmap_h__ #include "setypes.h"
+#include "ioctl_hdr_bmap.h"
+#include "ioctl_types_bmap.h"
+
+#undef SG_PACK
+#if defined(SG_PRAGMA_PACK)
+#pragma pack(push, 1)
+#define SG_PACK
+#elif defined(SG_ATTRIBUTE_PACK)
+#define SG_PACK __attribute__ ((packed)) #else #define SG_PACK #endif
+
+#ifndef SG_C_ASSERT
+#define SG_C_ASSERT(_name_, _condition_) #endif
+
+typedef struct _MIB_ETH_STATISTICS_PARAMS_IN {
+	u32 rsvd0;
+} SG_PACK MIB_ETH_STATISTICS_PARAMS_IN, *PMIB_ETH_STATISTICS_PARAMS_IN;
+
+typedef struct _BE_RXF_STATS {
+	u32 p0recvdtotalbytesLSD;	/* DWORD 0 */
+	u32 p0recvdtotalbytesMSD;	/* DWORD 1 */
+	u32 p0recvdtotalframes;	/* DWORD 2 */
+	u32 p0recvdunicastframes;	/* DWORD 3 */
+	u32 p0recvdmulticastframes;	/* DWORD 4 */
+	u32 p0recvdbroadcastframes;	/* DWORD 5 */
+	u32 p0crcerrors;	/* DWORD 6 */
+	u32 p0alignmentsymerrs;	/* DWORD 7 */
+	u32 p0pauseframesrecvd;	/* DWORD 8 */
+	u32 p0controlframesrecvd;	/* DWORD 9 */
+	u32 p0inrangelenerrors;	/* DWORD 10 */
+	u32 p0outrangeerrors;	/* DWORD 11 */
+	u32 p0frametoolongerrors;	/* DWORD 12 */
+	u32 p0droppedaddressmatch;	/* DWORD 13 */
+	u32 p0droppedvlanmismatch;	/* DWORD 14 */
+	u32 p0ipdroppedtoosmall;	/* DWORD 15 */
+	u32 p0ipdroppedtooshort;	/* DWORD 16 */
+	u32 p0ipdroppedhdrtoosmall;	/* DWORD 17 */
+	u32 p0tcpdroppedlen;	/* DWORD 18 */
+	u32 p0droppedrunt;	/* DWORD 19 */
+	u32 p0recvd64;		/* DWORD 20 */
+	u32 p0recvd65_127;	/* DWORD 21 */
+	u32 p0recvd128_256;	/* DWORD 22 */
+	u32 p0recvd256_511;	/* DWORD 23 */
+	u32 p0recvd512_1023;	/* DWORD 24 */
+	u32 p0recvd1518_1522;	/* DWORD 25 */
+	u32 p0recvd1522_2047;	/* DWORD 26 */
+	u32 p0recvd2048_4095;	/* DWORD 27 */
+	u32 p0recvd4096_8191;	/* DWORD 28 */
+	u32 p0recvd8192_9216;	/* DWORD 29 */
+	u32 p0rcvdipcksmerrs;	/* DWORD 30 */
+	u32 p0recvdtcpcksmerrs;	/* DWORD 31 */
+	u32 p0recvdudpcksmerrs;	/* DWORD 32 */
+	u32 p0recvdnonrsspackets;	/* DWORD 33 */
+	u32 p0recvdippackets;	/* DWORD 34 */
+	u32 p0recvdchute1packets;	/* DWORD 35 */
+	u32 p0recvdchute2packets;	/* DWORD 36 */
+	u32 p0recvdchute3packets;	/* DWORD 37 */
+	u32 p0recvdipsecpackets;	/* DWORD 38 */
+	u32 p0recvdmanagementpackets;	/* DWORD 39 */
+	u32 p0xmitbyteslsd;	/* DWORD 40 */
+	u32 p0xmitbytesmsd;	/* DWORD 41 */
+	u32 p0xmitunicastframes;	/* DWORD 42 */
+	u32 p0xmitmulticastframes;	/* DWORD 43 */
+	u32 p0xmitbroadcastframes;	/* DWORD 44 */
+	u32 p0xmitpauseframes;	/* DWORD 45 */
+	u32 p0xmitcontrolframes;	/* DWORD 46 */
+	u32 p0xmit64;		/* DWORD 47 */
+	u32 p0xmit65_127;	/* DWORD 48 */
+	u32 p0xmit128_256;	/* DWORD 49 */
+	u32 p0xmit256_511;	/* DWORD 50 */
+	u32 p0xmit512_1023;	/* DWORD 51 */
+	u32 p0xmit1518_1522;	/* DWORD 52 */
+	u32 p0xmit1522_2047;	/* DWORD 53 */
+	u32 p0xmit2048_4095;	/* DWORD 54 */
+	u32 p0xmit4096_8191;	/* DWORD 55 */
+	u32 p0xmit8192_9216;	/* DWORD 56 */
+	u32 p0rxfifooverflowdropped;	/* DWORD 57 */
+	u32 p0ipseclookupfaileddropped;	/* DWORD 58 */
+	u32 p1recvdtotalbytesLSD;	/* DWORD 59 */
+	u32 p1recvdtotalbytesMSD;	/* DWORD 60 */
+	u32 p1recvdtotalframes;	/* DWORD 61 */
+	u32 p1recvdunicastframes;	/* DWORD 62 */
+	u32 p1recvdmulticastframes;	/* DWORD 63 */
+	u32 p1recvdbroadcastframes;	/* DWORD 64 */
+	u32 p1crcerrors;	/* DWORD 65 */
+	u32 p1alignmentsymerrs;	/* DWORD 66 */
+	u32 p1pauseframesrecvd;	/* DWORD 67 */
+	u32 p1controlframesrecvd;	/* DWORD 68 */
+	u32 p1inrangelenerrors;	/* DWORD 69 */
+	u32 p1outrangeerrors;	/* DWORD 70 */
+	u32 p1frametoolongerrors;	/* DWORD 71 */
+	u32 p1droppedaddressmatch;	/* DWORD 72 */
+	u32 p1droppedvlanmismatch;	/* DWORD 73 */
+	u32 p1ipdroppedtoosmall;	/* DWORD 74 */
+	u32 p1ipdroppedtooshort;	/* DWORD 75 */
+	u32 p1ipdroppedhdrtoosmall;	/* DWORD 76 */
+	u32 p1tcpdroppedlen;	/* DWORD 77 */
+	u32 p1droppedrunt;	/* DWORD 78 */
+	u32 p1recvd64;		/* DWORD 79 */
+	u32 p1recvd65_127;	/* DWORD 80 */
+	u32 p1recvd128_256;	/* DWORD 81 */
+	u32 p1recvd256_511;	/* DWORD 82 */
+	u32 p1recvd512_1023;	/* DWORD 83 */
+	u32 p1recvd1518_1522;	/* DWORD 84 */
+	u32 p1recvd1522_2047;	/* DWORD 85 */
+	u32 p1recvd2048_4095;	/* DWORD 86 */
+	u32 p1recvd4096_8191;	/* DWORD 87 */
+	u32 p1recvd8192_9216;	/* DWORD 88 */
+	u32 p1rcvdipcksmerrs;	/* DWORD 89 */
+	u32 p1recvdtcpcksmerrs;	/* DWORD 90 */
+	u32 p1recvdudpcksmerrs;	/* DWORD 91 */
+	u32 p1recvdnonrsspackets;	/* DWORD 92 */
+	u32 p1recvdippackets;	/* DWORD 93 */
+	u32 p1recvdchute1packets;	/* DWORD 94 */
+	u32 p1recvdchute2packets;	/* DWORD 95 */
+	u32 p1recvdchute3packets;	/* DWORD 96 */
+	u32 p1recvdipsecpackets;	/* DWORD 97 */
+	u32 p1recvdmanagementpackets;	/* DWORD 98 */
+	u32 p1xmitbyteslsd;	/* DWORD 99 */
+	u32 p1xmitbytesmsd;	/* DWORD 100 */
+	u32 p1xmitunicastframes;	/* DWORD 101 */
+	u32 p1xmitmulticastframes;	/* DWORD 102 */
+	u32 p1xmitbroadcastframes;	/* DWORD 103 */
+	u32 p1xmitpauseframes;	/* DWORD 104 */
+	u32 p1xmitcontrolframes;	/* DWORD 105 */
+	u32 p1xmit64;		/* DWORD 106 */
+	u32 p1xmit65_127;	/* DWORD 107 */
+	u32 p1xmit128_256;	/* DWORD 108 */
+	u32 p1xmit256_511;	/* DWORD 109 */
+	u32 p1xmit512_1023;	/* DWORD 110 */
+	u32 p1xmit1518_1522;	/* DWORD 111 */
+	u32 p1xmit1522_2047;	/* DWORD 112 */
+	u32 p1xmit2048_4095;	/* DWORD 113 */
+	u32 p1xmit4096_8191;	/* DWORD 114 */
+	u32 p1xmit8192_9216;	/* DWORD 115 */
+	u32 p1rxfifooverflowdropped;	/* DWORD 116 */
+	u32 p1ipseclookupfaileddropped;	/* DWORD 117 */
+	u32 pxdroppednopbuf;	/* DWORD 118 */
+	u32 pxdroppednotxpb;	/* DWORD 119 */
+	u32 pxdroppednoipsecbuf;	/* DWORD 120 */
+	u32 pxdroppednoerxdescr;	/* DWORD 121 */
+	u32 pxdroppednotpredescr;	/* DWORD 122 */
+	u32 pxrecvdmanagementportpackets;	/* DWORD 123 */
+	u32 pxrecvdmanagementportbytes;	/* DWORD 124 */
+	u32 pxrecvdmanagementportpauseframes;	/* DWORD 125 */
+	u32 pxrecvdmanagementporterrors;	/* DWORD 126 */
+	u32 pxxmitmanagementportpackets;	/* DWORD 127 */
+	u32 pxxmitmanagementportbytes;	/* DWORD 128 */
+	u32 pxxmitmanagementportpause;	/* DWORD 129 */
+	u32 pxxmitmanagementportrxfifooverflow;	/* DWORD 130 */
+	u32 pxrecvdipsecipcksmerrs;	/* DWORD 131 */
+	u32 pxrecvdtcpsecipcksmerrs;	/* DWORD 132 */
+	u32 pxrecvdudpsecipcksmerrs;	/* DWORD 133 */
+	u32 pxipsecrunt;	/* DWORD 134 */
+	u32 pxipsecaddressmismatchdropped;	/* DWORD 135 */
+	u32 pxipsecrxfifooverflowdropped;	/* DWORD 136 */
+	u32 pxipsecframestoolong;	/* DWORD 137 */
+	u32 pxipsectotalipframes;	/* DWORD 138 */
+	u32 pxipseciptoosmall;	/* DWORD 139 */
+	u32 pxipseciptooshort;	/* DWORD 140 */
+	u32 pxipseciphdrtoosmall;	/* DWORD 141 */
+	u32 pxipsectcphdrbad;	/* DWORD 142 */
+	u32 pxrecvdipsecchute1;	/* DWORD 143 */
+	u32 pxrecvdipsecchute2;	/* DWORD 144 */
+	u32 pxrecvdipsecchute3;	/* DWORD 145 */
+	u32 pxdropped7frags;	/* DWORD 146 */
+	u32 pxdroppedfrags;	/* DWORD 147 */
+	u32 pxdroppedinvalidfragring;	/* DWORD 148 */
+	u32 pxnumforwardedpackets;	/* DWORD 149 */
+} SG_PACK BE_RXF_STATS, *PBE_RXF_STATS;
+
+typedef union _MIB_ETH_STATISTICS_PARAMS {
+	MIB_ETH_STATISTICS_PARAMS_IN request;
+	BE_RXF_STATS response;
+} SG_PACK MIB_ETH_STATISTICS_PARAMS, *PMIB_ETH_STATISTICS_PARAMS;
+
+/*
+ *  Query ethernet statistics. All domains may issue this IOCTL. The
+ *  host domain drivers  may optionally reset internal statistic 
+counters
+ *  with a query.
+ */
+typedef struct _IOCTL_ETH_GET_STATISTICS {
+	IOCTL_HEADER header;
+	MIB_ETH_STATISTICS_PARAMS params;
+} SG_PACK IOCTL_ETH_GET_STATISTICS, *PIOCTL_ETH_GET_STATISTICS;
+
+typedef struct _BE_RSS_CONFIG {
+	u16 enable_rss;
+	u16 cpu_table_size_log2;
+	u16 cqid0;
+	u16 cqid1;
+	u16 cqid2;
+	u16 cqid3;
+	u32 hash[4];
+	u8 cpu_table[128];
+	u16 cq_flush_mask;
+	u16 rsvd0;
+	u32 flush_value;
+} SG_PACK BE_RSS_CONFIG, *PBE_RSS_CONFIG;
+
+typedef struct _IOCTL_ETH_ANON_171_RESPONSE {
+	u32 rsvd0;
+} SG_PACK IOCTL_ETH_ANON_171_RESPONSE, *PIOCTL_ETH_ANON_171_RESPONSE;
+
+typedef union _IOCTL_ETH_ANON_170_PARAMS {
+	BE_RSS_CONFIG request;
+	IOCTL_ETH_ANON_171_RESPONSE response;
+} SG_PACK IOCTL_ETH_ANON_170_PARAMS, *PIOCTL_ETH_ANON_170_PARAMS;
+
+/*
+ *  Configures or disables receive side scaling (RSS), which 
+distributes
+ *  ethernet receive  completions among (up to 4) completion queues.
+ *  This is in addition to the default  ethernet receive completion queue.
+ *  Presumably, the host driver processes each  completion queue with
+ *  a DPC running on a different processor. This IOCTL can only be  
+issued
+ *  by domain 0 network drivers.
+ */
+typedef struct _IOCTL_ETH_RSS_CONFIG {
+	IOCTL_HEADER header;
+	IOCTL_ETH_ANON_170_PARAMS params;
+} SG_PACK IOCTL_ETH_RSS_CONFIG, *PIOCTL_ETH_RSS_CONFIG;
+
+typedef struct _IOCTL_ETH_ACPI_CONFIG_PARAMS {
+	u8 index;
+	u8 port0;
+	u8 port1;
+	u8 magic_packet;
+	u8 byte_pattern[128];
+	u32 bit_mask[4];
+} SG_PACK IOCTL_ETH_ACPI_CONFIG_PARAMS, *PIOCTL_ETH_ACPI_CONFIG_PARAMS;
+
+typedef struct _IOCTL_ETH_ANON_173_RESPONSE {
+	u32 rsvd0;
+} SG_PACK IOCTL_ETH_ANON_173_RESPONSE, *PIOCTL_ETH_ANON_173_RESPONSE;
+
+typedef union _IOCTL_ETH_ANON_172_PARAMS {
+	IOCTL_ETH_ACPI_CONFIG_PARAMS request;
+	IOCTL_ETH_ANON_173_RESPONSE response;
+} SG_PACK IOCTL_ETH_ANON_172_PARAMS, *PIOCTL_ETH_ANON_172_PARAMS;
+
+/*
+ *  Sets the magic packet or interesting packet byte pattern and mask
+ *  * for wake-on-lan.  Only host drivers are allowed to modify magic
+ *  packet * settings. Only the host  networking driver is allowed to
+ *  modify the * interesting packet byte pattern and mask  settings.
+ *
+ */
+typedef struct _IOCTL_ETH_ACPI_CONFIG {
+	IOCTL_HEADER header;
+	IOCTL_ETH_ANON_172_PARAMS params;
+} SG_PACK IOCTL_ETH_ACPI_CONFIG, *PIOCTL_ETH_ACPI_CONFIG;
+
+typedef struct _IOCTL_ETH_ANON_175_REQUEST {
+	u8 port0_promiscuous;
+	u8 port1_promiscuous;
+	u16 rsvd0;
+} SG_PACK IOCTL_ETH_ANON_175_REQUEST, *PIOCTL_ETH_ANON_175_REQUEST;
+
+typedef struct _IOCTL_ETH_ANON_176_RESPONSE {
+	u32 rsvd0;
+} SG_PACK IOCTL_ETH_ANON_176_RESPONSE, *PIOCTL_ETH_ANON_176_RESPONSE;
+
+typedef union _IOCTL_ETH_ANON_174_PARAMS {
+	IOCTL_ETH_ANON_175_REQUEST request;
+	IOCTL_ETH_ANON_176_RESPONSE response;
+} SG_PACK IOCTL_ETH_ANON_174_PARAMS, *PIOCTL_ETH_ANON_174_PARAMS;
+
+/* Enables/Disables promiscuous ethernet receive mode.  */ typedef 
+struct _IOCTL_ETH_PROMISCUOUS {
+	IOCTL_HEADER header;
+	IOCTL_ETH_ANON_174_PARAMS params;
+} SG_PACK IOCTL_ETH_PROMISCUOUS, *PIOCTL_ETH_PROMISCUOUS;
+
+typedef struct _IOCTL_ETH_ANON_178_REQUEST {
+	u32 new_fragsize_log2;
+} SG_PACK IOCTL_ETH_ANON_178_REQUEST, *PIOCTL_ETH_ANON_178_REQUEST;
+
+typedef struct _IOCTL_ETH_ANON_179_RESPONSE {
+	u32 actual_fragsize_log2;
+} SG_PACK IOCTL_ETH_ANON_179_RESPONSE, *PIOCTL_ETH_ANON_179_RESPONSE;
+
+typedef union _IOCTL_ETH_ANON_177_PARAMS {
+	IOCTL_ETH_ANON_178_REQUEST request;
+	IOCTL_ETH_ANON_179_RESPONSE response;
+} SG_PACK IOCTL_ETH_ANON_177_PARAMS, *PIOCTL_ETH_ANON_177_PARAMS;
+
+/*
+ *  Sets the Ethernet RX fragment size. Only host (domain 0) networking
+ *  drivers may issue  this IOCTL.  This call will fail for non-host
+ *  protection domains. In this situation the  MCC CQ status will 
+indicate
+ *  a failure due to insufficient priviledges. The response  should be
+ *  ignored, and the driver should use the IOCTL_ETH_GET_FRAG_SIZE to
+ *  query the  existing ethernet receive fragment size. It must use 
+this
+ *  fragment size for all  fragments in the ethernet receive ring.  If
+ *  the IOCTL succeeds, the driver must use the  frag size indicated
+ *  in the IOCTL response since the requested frag size may not be  
+applied
+ *  until the next reboot. When the requested fragsize matches the response
+ *   fragsize, this indicates the request was applied immediately.
+ */
+typedef struct _IOCTL_ETH_SET_RX_FRAG_SIZE {
+	IOCTL_HEADER header;
+	IOCTL_ETH_ANON_177_PARAMS params;
+} SG_PACK IOCTL_ETH_SET_RX_FRAG_SIZE, *PIOCTL_ETH_SET_RX_FRAG_SIZE;
+
+typedef struct _IOCTL_ETH_ANON_181_REQUEST {
+	u32 rsvd0;
+} SG_PACK IOCTL_ETH_ANON_181_REQUEST, *PIOCTL_ETH_ANON_181_REQUEST;
+
+typedef struct _IOCTL_ETH_ANON_182_RESPONSE {
+	u32 actual_fragsize_log2;
+} SG_PACK IOCTL_ETH_ANON_182_RESPONSE, *PIOCTL_ETH_ANON_182_RESPONSE;
+
+typedef union _IOCTL_ETH_ANON_180_PARAMS {
+	IOCTL_ETH_ANON_181_REQUEST request;
+	IOCTL_ETH_ANON_182_RESPONSE response;
+} SG_PACK IOCTL_ETH_ANON_180_PARAMS, *PIOCTL_ETH_ANON_180_PARAMS;
+
+/*
+ *  Queries the Ethernet RX fragment size. All domains may issue this
+ *  IOCTL.  The driver  should call this IOCTL to determine the minimum
+ *  required fragment size for the ethernet  RX ring buffers. Drivers
+ *  may choose to use a larger size for each fragment buffer, but  
+BladeEngine
+ *  will use up to the configured minimum required fragsize in each ethernet
+ *   receive fragment buffer. For example, if the ethernet receive fragment
+ *  size is  configured to 4kB, and a driver uses 8kB fragments, a 6kB
+ *  ethernet packet received by  BladeEngine will be split accross two
+ *  of the driver's receive framgents (4kB in one  fragment buffer, and
+ *  2kB in the subsequent fragment buffer).
+ */
+typedef struct _IOCTL_ETH_GET_RX_FRAG_SIZE {
+	IOCTL_HEADER header;
+	IOCTL_ETH_ANON_180_PARAMS params;
+} SG_PACK IOCTL_ETH_GET_RX_FRAG_SIZE, *PIOCTL_ETH_GET_RX_FRAG_SIZE;
+
+#ifdef SG_PRAGMA_PACK
+#pragma pack(pop)
+#endif
+
+#endif /* __ioctl_eth_bmap_h__ */
diff -uprN orig/linux-2.6.24.2/drivers/message/beclib/fw/bmap/ioctl_mcc_bmap.h benet/linux-2.6.24.2/drivers/message/beclib/fw/bmap/ioctl_mcc_bmap.h
--- orig/linux-2.6.24.2/drivers/message/beclib/fw/bmap/ioctl_mcc_bmap.h	1970-01-01 05:30:00.000000000 +0530
+++ benet/linux-2.6.24.2/drivers/message/beclib/fw/bmap/ioctl_mcc_bmap.h	2008-02-14 15:23:07.842200568 +0530
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or at your option any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor
+ * Boston, MA 02110-1301 USA
+ *
+ *
+ * The full GNU General Public License is included in this distribution
+ * in the file called GPL.
+ *
+ * Contact Information:
+ * linux-drivers@serverengines.com
+ *
+ * ServerEngines
+ * 209 N. Fair Oaks Ave
+ * Sunnyvale, CA 94085
+ */
+/*
+ * Autogenerated by srcgen version: 0127  */ #ifndef 
+__ioctl_mcc_bmap_h__ #define __ioctl_mcc_bmap_h__ #include "setypes.h"
+
+#undef SG_PACK
+#if defined(SG_PRAGMA_PACK)
+#pragma pack(push, 1)
+#define SG_PACK
+#elif defined(SG_ATTRIBUTE_PACK)
+#define SG_PACK __attribute__ ((packed)) #else #define SG_PACK #endif
+
+#ifndef SG_C_ASSERT
+#define SG_C_ASSERT(_name_, _condition_) #endif
+
+/*
+ *  Where applicable, a WRB, may contain a list of Scatter-gather elements.
+ *  Each element  supports a 64 bit address and a 32bit length field.
+ *
+ */
+typedef struct _MCC_SGE {
+	u32 pa_lo;		/* DWORD 0 */
+	u32 pa_hi;		/* DWORD 1 */
+	u32 length;		/* DWORD 2 */
+} SG_PACK MCC_SGE, *PMCC_SGE;
+
+/*
+ *  The design of an MCC_SGE allows up to 19 elements to be embedded
+ *  in a WRB, supporting  64KB data transfers (assuming a 4KB page size).
+ *
+ */
+typedef union _MCC_WRB_PAYLOAD {
+	MCC_SGE sgl[19];
+	u32 embedded[59];	/* DWORDS 57 to 115 */
+} SG_PACK MCC_WRB_PAYLOAD, *PMCC_WRB_PAYLOAD;
+
+/*
+ *  This is the structure of the MCC Command WRB for commands sent to
+ *  the Management  Processing Unit (MPU). See section IOCTL_TYPES for
+ *  usage in embedded and non-embedded  modes.
+ */
+typedef struct _MCC_WRB {
+	u32 embedded:1;		/* DWORD 0 */
+	u32 rsvd0:2;		/* DWORD 0 */
+	u32 sge_count:5;	/* DWORD 0 */
+	u32 rsvd1:16;		/* DWORD 0 */
+	u32 special:8;		/* DWORD 0 */
+	u32 payload_length;	/* DWORD 1 */
+	u32 tag[2];		/* DWORDS 2 to 3 */
+	u32 rsvd2[1];		/* DWORDS 4 to 4 */
+	MCC_WRB_PAYLOAD payload;
+} SG_PACK MCC_WRB, *PMCC_WRB;
+
+/* This is the structure of the MCC Completion queue entry  */ typedef 
+struct _MCC_CQ_ENTRY {
+	u32 completion_status:16;	/* DWORD 0 */
+	u32 extended_status:16;	/* DWORD 0 */
+	u32 mcc_tag[2];		/* DWORDS 1 to 2 */
+	u32 rsvd0:27;		/* DWORD 3 */
+	u32 consumed:1;		/* DWORD 3 */
+	u32 completed:1;	/* DWORD 3 */
+	u32 hpi_buffer_completion:1;	/* DWORD 3 */
+	u32 async_event:1;	/* DWORD 3 */
+	u32 valid:1;		/* DWORD 3 */
+} SG_PACK MCC_CQ_ENTRY, *PMCC_CQ_ENTRY;
+
+/* Mailbox structures used by the MPU during bootstrap */ typedef 
+struct _MCC_MAILBOX {
+	MCC_WRB wrb;
+	MCC_CQ_ENTRY cq;
+} SG_PACK MCC_MAILBOX, *PMCC_MAILBOX;
+
+#ifdef SG_PRAGMA_PACK
+#pragma pack(pop)
+#endif
+
+#endif /* __ioctl_mcc_bmap_h__ */
diff -uprN orig/linux-2.6.24.2/drivers/message/beclib/fw/bmap/post_codes_bmap.h benet/linux-2.6.24.2/drivers/message/beclib/fw/bmap/post_codes_bmap.h
--- orig/linux-2.6.24.2/drivers/message/beclib/fw/bmap/post_codes_bmap.h	1970-01-01 05:30:00.000000000 +0530
+++ benet/linux-2.6.24.2/drivers/message/beclib/fw/bmap/post_codes_bmap.h	2008-02-14 15:23:07.842200568 +0530
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2005 - 2008 ServerEngines
+ * All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or at your option any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, 5th Floor
+ * Boston, MA 02110-1301 USA
+ *
+ *
+ * The full GNU General Public License is included in this distribution
+ * in the file called GPL.
+ *
+ * Contact Information:
+ * linux-drivers@serverengines.com
+ *
+ * ServerEngines
+ * 209 N. Fair Oaks Ave
+ * Sunnyvale, CA 94085
+ */
+/*
+ * Autogenerated by srcgen version: 0127  */ #ifndef 
+__post_codes_bmap_h__ #define __post_codes_bmap_h__ #include 
+"setypes.h"
+
+#undef SG_PACK
+#if defined(SG_PRAGMA_PACK)
+#pragma pack(push, 1)
+#define SG_PACK
+#elif defined(SG_ATTRIBUTE_PACK)
+#define SG_PACK __attribute__ ((packed)) #else #define SG_PACK #endif
+
+#ifndef SG_C_ASSERT
+#define SG_C_ASSERT(_name_, _condition_) #endif
+
+#if defined(__BIG_ENDIAN)
+   /* This structure defines the format of the MPU semaphore register
+    * when used for POST.  */
+typedef struct _MGMT_HBA_POST_STATUS_STRUCT {
+	union {
+		struct {
+			u32 error:1;	/* DWORD 0 */
+			u32 backup_fw:1;	/* DWORD 0 */
+			u32 iscsi_no_ip:1;	/* DWORD 0 */
+			u32 iscsi_ip_conflict:1;	/* DWORD 0 */
+			u32 option_rom_installed:1;	/* DWORD 0 */
+			u32 iscsi_driver_loaded:1;	/* DWORD 0 */
+			u32 rsvd0:10;	/* DWORD 0 */
+			u32 stage:16;	/* DWORD 0 */
+		} SG_PACK;	/* unnamed struct */
+		u32 dw;		/* dword union */
+	};			/* unnamed union */
+} SG_PACK MGMT_HBA_POST_STATUS_STRUCT, *PMGMT_HBA_POST_STATUS_STRUCT;
+
+SG_C_ASSERT(__sizeof__MGMT_HBA_POST_STATUS_STRUCT,
+	    sizeof(MGMT_HBA_POST_STATUS_STRUCT) == 4);
+
+#else
+   /* This structure defines the format of the MPU semaphore register
+    * when used for POST.  */
+typedef struct _MGMT_HBA_POST_STATUS_STRUCT {
+	union {
+		struct {
+			u32 stage:16;	/* DWORD 0 */
+			u32 rsvd0:10;	/* DWORD 0 */
+			u32 iscsi_driver_loaded:1;	/* DWORD 0 */
+			u32 option_rom_installed:1;	/* DWORD 0 */
+			u32 iscsi_ip_conflict:1;	/* DWORD 0 */
+			u32 iscsi_no_ip:1;	/* DWORD 0 */
+			u32 backup_fw:1;	/* DWORD 0 */
+			u32 error:1;	/* DWORD 0 */
+		} SG_PACK;	/* unnamed struct */
+		u32 dw;		/* dword union */
+	};			/* unnamed union */
+} SG_PACK MGMT_HBA_POST_STATUS_STRUCT, *PMGMT_HBA_POST_STATUS_STRUCT;
+
+SG_C_ASSERT(__sizeof__MGMT_HBA_POST_STATUS_STRUCT,
+	    sizeof(MGMT_HBA_POST_STATUS_STRUCT) == 4); #endif
+
+#ifdef SG_PRAGMA_PACK
+#pragma pack(pop)
+#endif
+
+#endif /* __post_codes_bmap_h__ */

___________________________________________________________________________________
This message, together with any attachment(s), contains confidential and proprietary information of
ServerEngines Corporation and is intended only for the designated recipient(s) named above. Any unauthorized
review, printing, retention, copying, disclosure or distribution is strictly prohibited.  If you are not the
intended recipient of this message, please immediately advise the sender by reply email message and
delete all copies of this message and any attachment(s). Thank you.


^ 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