Re: [PATCH 08/40] mm: kmem_cache_objsize

2007-05-05 Thread Pekka J Enberg
On Fri, 4 May 2007, Christoph Lameter wrote:
 He is not able to calculate it just using the object size since he does 
 not know where the slab put the slab management structure. And in case of 
 SLUB there is no slab management structure... Which means he would have to 
 special case based on the slab allocator selected.

Let me state this once more: he is interested in _rough approximation_. It 
makes no sense to me to add this kind of fuzzy logic in the slab. Now, as 
the slab clearly cannot give a _precise number_ either, it shouldn't be 
added there.

But, if both of you really want to stick it in mm/slab.c, I guess I won't 
be too violently opposed to it. It just doesn't make any sense to me.

Pekka
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: How to find I/F to destination

2007-05-05 Thread Evgeniy Polyakov
On Fri, May 04, 2007 at 02:33:45PM +0100, David Howells ([EMAIL PROTECTED]) 
wrote:
 Evgeniy Polyakov [EMAIL PROTECTED] wrote:
 
  That is the same, dst is dereferenced as rtable.
  Cloned dst is returned, so it must be put back at the ned of the usage.
 
 If that's the case, then why do you bother to clone it in route_get_raw()?
 Surely that'll give you *two* clones...
 
 BTW, it seems to work.  The attached function gives me:
 
   [0mount ] == rxrpc_assess_MTU_size() [if_mtu 1500]
 
 Thanks!
 
 David
 
 ---
 static void rxrpc_assess_MTU_size(struct rxrpc_peer *peer)
 {
   struct rtable *rt;
   struct flowi fl;
   int ret;
 
   peer-if_mtu = 1500;
 
   memset(fl, 0, sizeof(fl));
 
   switch (peer-srx.transport.family) {
   case AF_INET:
   fl.oif = 0;
   fl.proto = IPPROTO_UDP,
   fl.nl_u.ip4_u.saddr = 0;
   fl.nl_u.ip4_u.daddr = peer-srx.transport.sin.sin_addr.s_addr;
   fl.nl_u.ip4_u.tos = 0;
   /* assume AFS.CM talking to AFS.FS */
   fl.uli_u.ports.sport = htonl(7001);
   fl.uli_u.ports.dport = htonl(7000);
   break;
   default:
   BUG();
   }
 
   ret = ip_route_output_key(rt, fl);

This one is quite slow compared to atomic reference increase, so yes,
there are two clones - one for main 'route', which then is being cloned
for each used in fast path. When it is not needed anymore (netchannel is
removed), the first one is dropped.

   if (ret  0) {
   kleave( [route err %d], ret);
   return;
   }
 
   peer-if_mtu = dst_mtu(rt-u.dst);
   kleave( [if_mtu %u], peer-if_mtu);
 }

-- 
Evgeniy Polyakov
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] add mac80211 wireless infrastructure

2007-05-05 Thread Christoph Hellwig
On Fri, May 04, 2007 at 11:17:49PM -0400, John W. Linville wrote:
 This series adds the mac80211 component.  This is the new wireless
 infrastructure for softmac-style wireless hardware.  It originated
 as code contributed by Devicescape, and has been under development by
 the community for well over a year.  Thanks are due especially to Jiri
 Benc and Michael Wu as well as Johannes Berg and a number of other
 contributors who have worked to hammer this into its current form.
 
 This component was in -mm for most of the 2.6.21 cycle, with few
 reported bugs.  The code is also currently available in Fedora rawhide
 where it has performed well.
 
 The wireless developers would like this to be considered for merge
 in time for 2.6.22.  Patches for at least one mac80211-based driver
 will follow shortly.

Please send out patches for review first.  Last time I looked through
the stuff in -mm there were a lot of things that were in pretty bad
shape still.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/40] Swap over Networked storage -v12

2007-05-05 Thread Christoph Hellwig
On Fri, May 04, 2007 at 12:27:16PM -0700, David Miller wrote:
 From: Peter Zijlstra [EMAIL PROTECTED]
 Date: Fri, 04 May 2007 12:26:51 +0200
 
  There is a fundamental deadlock associated with paging;
 
 I know you'd really like people like myself to review this work, but a
 set of 40 patches is just too much to try and digest at once
 especially when I have other things going on.  When I have lots of
 other things already on my plate, when I see a huge patch set like
 this I have to just say delete because I don't kid myself since
 I know I'll never get to it.
 
 Sorry there's now way I can review this with my current workload.

There also quite alot of only semi-related thing in there.  It would
be much better to only do the network stack and iscsi parts first
and leave nfs out for a while.  Especially as the former are definitively
useful while I strongly doubt that for swap over nfs.

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4 (resend)] mac80211: add maintainers entry for mac80211

2007-05-05 Thread John W. Linville
From: Jiri Benc [EMAIL PROTECTED]

Add MAINTAINERS entry for mac80211.

Signed-off-by: Jiri Benc [EMAIL PROTECTED]
Signed-off-by: John W. Linville [EMAIL PROTECTED]
---
 MAINTAINERS |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index af1c792..5ba3d1d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2209,6 +2209,16 @@ M:   [EMAIL PROTECTED]
 W: http://www.tazenda.demon.co.uk/phil/linux-hp
 S: Maintained
 
+MAC80211
+P: Jiri Benc
+M: [EMAIL PROTECTED]
+P: Michael Wu
+M: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
+W: http://linuxwireless.org/
+T: git kernel.org:/pub/scm/linux/kernel/git/jbenc/mac80211.git
+S: Maintained
+
 MARVELL YUKON / SYSKONNECT DRIVER
 P: Mirko Lindner
 M: [EMAIL PROTECTED]
-- 
1.5.0.6

-- 
John W. Linville
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/4 (resend)] mac80211: add mac80211 wireless stack

2007-05-05 Thread John W. Linville
From: Jiri Benc [EMAIL PROTECTED]

Add mac80211, the IEEE 802.11 software MAC layer.

Signed-off-by: Jiri Benc [EMAIL PROTECTED]
Signed-off-by: John W. Linville [EMAIL PROTECTED]
---
 include/net/mac80211.h  | 1045 
 net/Kconfig |1 +
 net/Makefile|4 +-
 net/mac80211/Kconfig|   69 +
 net/mac80211/Makefile   |   19 +
 net/mac80211/aes_ccm.c  |  155 ++
 net/mac80211/aes_ccm.h  |   26 +
 net/mac80211/hostapd_ioctl.h|  108 +
 net/mac80211/ieee80211.c| 4970 +++
 net/mac80211/ieee80211_cfg.c|   66 +
 net/mac80211/ieee80211_cfg.h|9 +
 net/mac80211/ieee80211_common.h |   98 +
 net/mac80211/ieee80211_i.h  |  671 ++
 net/mac80211/ieee80211_iface.c  |  344 +++
 net/mac80211/ieee80211_ioctl.c  | 1806 ++
 net/mac80211/ieee80211_key.h|   89 +
 net/mac80211/ieee80211_led.c|   91 +
 net/mac80211/ieee80211_led.h|   32 +
 net/mac80211/ieee80211_rate.c   |  140 ++
 net/mac80211/ieee80211_rate.h   |  122 +
 net/mac80211/ieee80211_sta.c| 3060 
 net/mac80211/michael.c  |  104 +
 net/mac80211/michael.h  |   20 +
 net/mac80211/rc80211_simple.c   |  361 +++
 net/mac80211/sta_info.c |  386 +++
 net/mac80211/sta_info.h |  145 ++
 net/mac80211/tkip.c |  341 +++
 net/mac80211/tkip.h |   36 +
 net/mac80211/wep.c  |  328 +++
 net/mac80211/wep.h  |   40 +
 net/mac80211/wme.c  |  678 ++
 net/mac80211/wme.h  |   57 +
 net/mac80211/wpa.c  |  660 ++
 net/mac80211/wpa.h  |   31 +
 34 files changed, 16110 insertions(+), 2 deletions(-)
 create mode 100644 include/net/mac80211.h
 create mode 100644 net/mac80211/Kconfig
 create mode 100644 net/mac80211/Makefile
 create mode 100644 net/mac80211/aes_ccm.c
 create mode 100644 net/mac80211/aes_ccm.h
 create mode 100644 net/mac80211/hostapd_ioctl.h
 create mode 100644 net/mac80211/ieee80211.c
 create mode 100644 net/mac80211/ieee80211_cfg.c
 create mode 100644 net/mac80211/ieee80211_cfg.h
 create mode 100644 net/mac80211/ieee80211_common.h
 create mode 100644 net/mac80211/ieee80211_i.h
 create mode 100644 net/mac80211/ieee80211_iface.c
 create mode 100644 net/mac80211/ieee80211_ioctl.c
 create mode 100644 net/mac80211/ieee80211_key.h
 create mode 100644 net/mac80211/ieee80211_led.c
 create mode 100644 net/mac80211/ieee80211_led.h
 create mode 100644 net/mac80211/ieee80211_rate.c
 create mode 100644 net/mac80211/ieee80211_rate.h
 create mode 100644 net/mac80211/ieee80211_sta.c
 create mode 100644 net/mac80211/michael.c
 create mode 100644 net/mac80211/michael.h
 create mode 100644 net/mac80211/rc80211_simple.c
 create mode 100644 net/mac80211/sta_info.c
 create mode 100644 net/mac80211/sta_info.h
 create mode 100644 net/mac80211/tkip.c
 create mode 100644 net/mac80211/tkip.h
 create mode 100644 net/mac80211/wep.c
 create mode 100644 net/mac80211/wep.h
 create mode 100644 net/mac80211/wme.c
 create mode 100644 net/mac80211/wme.h
 create mode 100644 net/mac80211/wpa.c
 create mode 100644 net/mac80211/wpa.h

Patch is huge, so it is available here:


http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/mac80211/0002-mac80211-add-mac80211-wireless-stack.patch

-- 
John W. Linville
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/4 (resend)] mac80211: add generic include/linux/ieee80211.h

2007-05-05 Thread John W. Linville
From: Jiri Benc [EMAIL PROTECTED]

Add generic IEEE 802.11 definitions.

Signed-off-by: Jiri Benc [EMAIL PROTECTED]
Signed-off-by: John W. Linville [EMAIL PROTECTED]
---
 include/linux/ieee80211.h |  342 +
 1 files changed, 342 insertions(+), 0 deletions(-)
 create mode 100644 include/linux/ieee80211.h

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
new file mode 100644
index 000..ecd61e8
--- /dev/null
+++ b/include/linux/ieee80211.h
@@ -0,0 +1,342 @@
+/*
+ * IEEE 802.11 defines
+ *
+ * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen
+ * [EMAIL PROTECTED]
+ * Copyright (c) 2002-2003, Jouni Malinen [EMAIL PROTECTED]
+ * Copyright (c) 2005, Devicescape Software, Inc.
+ * Copyright (c) 2006, Michael Wu [EMAIL PROTECTED]
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef IEEE80211_H
+#define IEEE80211_H
+
+#include linux/types.h
+
+#define FCS_LEN 4
+
+#define IEEE80211_FCTL_VERS0x0003
+#define IEEE80211_FCTL_FTYPE   0x000c
+#define IEEE80211_FCTL_STYPE   0x00f0
+#define IEEE80211_FCTL_TODS0x0100
+#define IEEE80211_FCTL_FROMDS  0x0200
+#define IEEE80211_FCTL_MOREFRAGS   0x0400
+#define IEEE80211_FCTL_RETRY   0x0800
+#define IEEE80211_FCTL_PM  0x1000
+#define IEEE80211_FCTL_MOREDATA0x2000
+#define IEEE80211_FCTL_PROTECTED   0x4000
+#define IEEE80211_FCTL_ORDER   0x8000
+
+#define IEEE80211_SCTL_FRAG0x000F
+#define IEEE80211_SCTL_SEQ 0xFFF0
+
+#define IEEE80211_FTYPE_MGMT   0x
+#define IEEE80211_FTYPE_CTL0x0004
+#define IEEE80211_FTYPE_DATA   0x0008
+
+/* management */
+#define IEEE80211_STYPE_ASSOC_REQ  0x
+#define IEEE80211_STYPE_ASSOC_RESP 0x0010
+#define IEEE80211_STYPE_REASSOC_REQ0x0020
+#define IEEE80211_STYPE_REASSOC_RESP   0x0030
+#define IEEE80211_STYPE_PROBE_REQ  0x0040
+#define IEEE80211_STYPE_PROBE_RESP 0x0050
+#define IEEE80211_STYPE_BEACON 0x0080
+#define IEEE80211_STYPE_ATIM   0x0090
+#define IEEE80211_STYPE_DISASSOC   0x00A0
+#define IEEE80211_STYPE_AUTH   0x00B0
+#define IEEE80211_STYPE_DEAUTH 0x00C0
+#define IEEE80211_STYPE_ACTION 0x00D0
+
+/* control */
+#define IEEE80211_STYPE_PSPOLL 0x00A0
+#define IEEE80211_STYPE_RTS0x00B0
+#define IEEE80211_STYPE_CTS0x00C0
+#define IEEE80211_STYPE_ACK0x00D0
+#define IEEE80211_STYPE_CFEND  0x00E0
+#define IEEE80211_STYPE_CFENDACK   0x00F0
+
+/* data */
+#define IEEE80211_STYPE_DATA   0x
+#define IEEE80211_STYPE_DATA_CFACK 0x0010
+#define IEEE80211_STYPE_DATA_CFPOLL0x0020
+#define IEEE80211_STYPE_DATA_CFACKPOLL 0x0030
+#define IEEE80211_STYPE_NULLFUNC   0x0040
+#define IEEE80211_STYPE_CFACK  0x0050
+#define IEEE80211_STYPE_CFPOLL 0x0060
+#define IEEE80211_STYPE_CFACKPOLL  0x0070
+#define IEEE80211_STYPE_QOS_DATA   0x0080
+#define IEEE80211_STYPE_QOS_DATA_CFACK 0x0090
+#define IEEE80211_STYPE_QOS_DATA_CFPOLL0x00A0
+#define IEEE80211_STYPE_QOS_DATA_CFACKPOLL 0x00B0
+#define IEEE80211_STYPE_QOS_NULLFUNC   0x00C0
+#define IEEE80211_STYPE_QOS_CFACK  0x00D0
+#define IEEE80211_STYPE_QOS_CFPOLL 0x00E0
+#define IEEE80211_STYPE_QOS_CFACKPOLL  0x00F0
+
+
+/* miscellaneous IEEE 802.11 constants */
+#define IEEE80211_MAX_FRAG_THRESHOLD   2346
+#define IEEE80211_MAX_RTS_THRESHOLD2347
+#define IEEE80211_MAX_AID  2007
+#define IEEE80211_MAX_TIM_LEN  251
+#define IEEE80211_MAX_DATA_LEN 2304
+/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
+   6.2.1.1.2.
+
+   The figure in section 7.1.2 suggests a body size of up to 2312
+   bytes is allowed, which is a bit confusing, I suspect this
+   represents the 2304 bytes of real data, plus a possible 8 bytes of
+   WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) */
+
+#define IEEE80211_MAX_SSID_LEN 32
+
+struct ieee80211_hdr {
+   __le16 frame_control;
+   __le16 duration_id;
+   u8 addr1[6];
+   u8 addr2[6];
+   u8 addr3[6];
+   __le16 seq_ctrl;
+   u8 addr4[6];
+} __attribute__ ((packed));
+
+
+struct ieee80211_mgmt {
+   __le16 frame_control;
+   __le16 duration;
+   u8 da[6];
+   u8 sa[6];
+   u8 bssid[6];
+   __le16 seq_ctrl;
+   union {
+   struct {
+   __le16 auth_alg;
+   __le16 auth_transaction;
+   __le16 status_code;
+   /* possibly followed by Challenge text */
+   

Re: [patch 25/29] xen: Add the Xen virtual network device driver.

2007-05-05 Thread Rusty Russell
On Sat, 2007-05-05 at 10:16 +0100, Christoph Hellwig wrote:
 I wish people would have listened to me back then and made the
 description part of the modular_param statement..

Sometimes we weary of change.  However, come up with a decent name and
implement it and we can deprecate module_param() by say... 2012?

Cheers,
Rusty.


-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] [AF_IUCV/IUCV] : Add missing section annotations

2007-05-05 Thread Heiko Carstens
On Fri, May 04, 2007 at 12:24:19PM -0700, David Miller wrote:
 From: Frank Pavlic [EMAIL PROTECTED]
 Date: Fri, 4 May 2007 11:52:38 +0200
 
  From: Heiko Carstens [EMAIL PROTECTED]
  
  Add missing section annotations and found and fixed some
  Coding Style issues.
  
  Signed-off-by: Heiko Carstens [EMAIL PROTECTED]
  Signed-off-by: Frank Pavlic [EMAIL PROTECTED]
 
 Applied, although I find it amusing that the changelog
 header talks about section annotations (plural!) but
 that is one line of the patch, whereas %99 of the patch
 is coding style cleanups.

Actually it contained the breathtaking number of 3 section
annotations, so that only 95% of the patch is coding style
cleanups ;)
Apparantly Frank merged two patches and took the one line
patch description of the first one.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 25/29] xen: Add the Xen virtual network device driver.

2007-05-05 Thread Jeremy Fitzhardinge
Christoph Hellwig wrote:
 There only seems to be a module description but no actual paramter for
 this.  I wish people would have listened to me back then and made the
 description part of the modular_param statement..
   

Uh, what did I miss?  Oh, I see, I need a module_param(rx_mode, int,
0600) or something?  Or maybe with a callback if we can change it on the
fly?  And enum type?  Or maybe I string?

I'll sort it out.

 +
 +#define RX_COPY_THRESHOLD 256
 +
 +#define GRANT_INVALID_REF   0
 +
 +#define NET_TX_RING_SIZE __RING_SIZE((struct xen_netif_tx_sring *)0, 
 PAGE_SIZE)
 +#define NET_RX_RING_SIZE __RING_SIZE((struct xen_netif_rx_sring *)0, 
 PAGE_SIZE)
 

 __RING_SIZE is not in my tree, so it seems to be some kind of Xen
 addition.  Can you make that clear in the name and give it a less
 awkware calling convention, e.g. only pass in the type, not a null
 pointer of the given type?
   

Yeah.  The Xen ring stuff is a bit full of magic macros, so I was going
to look at inlineizing/re-namespacing it in a separate patch.

 +/*
 + * Implement our own carrier flag: the network stack's version causes delays
 + * when the carrier is re-enabled (in particular, dev_activate() may not
 + * immediately be called, which can cause packet loss).
 + */
 +#define netfront_carrier_on(netif)  ((netif)-carrier = 1)
 +#define netfront_carrier_off(netif) ((netif)-carrier = 0)
 +#define netfront_carrier_ok(netif)  ((netif)-carrier)
 

 This doesn't implement my review suggestion despite you ACKing
 them.  Didn't you like it in the end or did you simply forget
 about it?
   

Sorry, I forgot about it.  I was waiting to hear back from network
people about what this is actually for, and whether we really need it. 
Rusty said in his review:
 Well, you only call netfront_carrier_on() from one place, so it's pretty
 easy to do netif_carrier_on(); dev_activate(); there.

 I don't think this is critical though.
   

It wasn't obvious to me whether this meant that we could avoid having a
netfront-private carrier flag but still get quick response by using
netif_carrier_on(); dev_activate();.

J
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[-mm patch] fix fs/nfs/nfsroot.c compile error

2007-05-05 Thread Adrian Bunk
On Sat, May 05, 2007 at 01:49:55AM -0700, Andrew Morton wrote:
...
 Changes since 2.6.21-rc7-mm2:
...
  git-net.patch
...
  git trees
...

match_table_t was made const and gcc doesn't like const __initdata:

--  snip  --

...
  CC  fs/nfs/nfsroot.o
/home/bunk/linux/kernel-2.6/linux-2.6.21-mm1/fs/nfs/nfsroot.c:131: error: 
tokens causes a section type conflict
make[3]: *** [fs/nfs/nfsroot.o] Error 1

--  snip  --

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]

---

BTW: Why is this change to include/linux/parser.h in the net tree?

--- linux-2.6.21-mm1/fs/nfs/nfsroot.c.old   2007-05-05 18:36:26.0 
+0200
+++ linux-2.6.21-mm1/fs/nfs/nfsroot.c   2007-05-05 18:36:44.0 +0200
@@ -128,7 +128,7 @@
Opt_err
 };
 
-static match_table_t __initdata tokens = {
+static match_table_t tokens = {
{Opt_port, port=%u},
{Opt_rsize, rsize=%u},
{Opt_wsize, wsize=%u},
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [-mm patch] fix fs/nfs/nfsroot.c compile error

2007-05-05 Thread Trond Myklebust
On Sat, 2007-05-05 at 18:44 +0200, Adrian Bunk wrote:
 On Sat, May 05, 2007 at 01:49:55AM -0700, Andrew Morton wrote:
 ...
  Changes since 2.6.21-rc7-mm2:
 ...
   git-net.patch
 ...
   git trees
 ...
 
 match_table_t was made const and gcc doesn't like const __initdata:

Then please revert the fix to match_table_t...

There is no reason for something like the nfsroot parser to be kept in
memory after the system has booted. That would be code bloat.

Trond

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 7/11][TG3]: Eliminate the TG3_FLAG_5701_REG_WRITE_BUG flag.

2007-05-05 Thread Christoph Hellwig
On Fri, May 04, 2007 at 05:54:17PM -0700, Michael Chan wrote:
 + else if (GET_ASIC_REV(tp-pci_chip_rev_id) == ASIC_REV_5701 ||
 +  ((tp-tg3_flags2  TG3_FLG2_PCI_EXPRESS) 
 +   tp-pci_chip_rev_id == CHIPREV_ID_5750_A0)) {
 + /* Back to back register writes can cause problems on this chip,
 +  * the workaround is to read back all reg writes except those to
 +  * mailbox regs.  See tg3_write_indirect_reg32().
 +  *
 +  * PCI Express 5750_A0 rev chips need this workaround too.
 +  */
   tp-write32 = tg3_write_flush_reg32;

This comment is a little odd now.  What about

/*
 * Back to back register writes can cause problems on these
 * chips, the workaround is to read back all reg writes
 * except those to mailbox regs.
 *
 * See tg3_write_indirect_reg32().
 */

instead?

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [-mm patch] fix fs/nfs/nfsroot.c compile error

2007-05-05 Thread Trond Myklebust
On Sat, 2007-05-05 at 13:20 -0400, Trond Myklebust wrote:
 On Sat, 2007-05-05 at 18:44 +0200, Adrian Bunk wrote:
  On Sat, May 05, 2007 at 01:49:55AM -0700, Andrew Morton wrote:
  ...
   Changes since 2.6.21-rc7-mm2:
  ...
git-net.patch
  ...
git trees
  ...
  
  match_table_t was made const and gcc doesn't like const __initdata:
 
 Then please revert the fix to match_table_t...
 
 There is no reason for something like the nfsroot parser to be kept in
 memory after the system has booted. That would be code bloat.
 
 Trond

Alternatively, please change the nfsroot parser to use

static struct match_token tokens[] __initdata = {

That is in any case cleaner than using a typedef.

Trond

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/40] Swap over Networked storage -v12

2007-05-05 Thread William Lee Irwin III
On Fri, 04 May 2007 12:26:51 +0200, Peter Zijlstra [EMAIL PROTECTED] wrote:
 There is a fundamental deadlock associated with paging;

On Fri, May 04, 2007 at 12:27:16PM -0700, David Miller wrote:
 I know you'd really like people like myself to review this work, but a
 set of 40 patches is just too much to try and digest at once
 especially when I have other things going on.  When I have lots of
 other things already on my plate, when I see a huge patch set like
 this I have to just say delete because I don't kid myself since
 I know I'll never get to it.
 Sorry there's now way I can review this with my current workload.

On Sat, May 05, 2007 at 10:43:00AM +0100, Christoph Hellwig wrote:
 There also quite alot of only semi-related thing in there.  It would
 be much better to only do the network stack and iscsi parts first
 and leave nfs out for a while.  Especially as the former are definitively
 useful while I strongly doubt that for swap over nfs.

This is backward. As much as we hate it, the common case is swap over
nfs, essentially because that is/was how things were commonly set up
for other operating systems. I'm not a Solaris administrator, though,
so various disclaimers apply.


-- wli
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch 25/29] xen: Add the Xen virtual network device driver.

2007-05-05 Thread Herbert Xu
On Sat, May 05, 2007 at 03:05:07AM -0700, Jeremy Fitzhardinge wrote:

 Sorry, I forgot about it.  I was waiting to hear back from network
 people about what this is actually for, and whether we really need it. 

We should just change this to use netif_device_attach and
netif_device_detach.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] add mac80211 wireless infrastructure

2007-05-05 Thread David Miller
From: John W. Linville [EMAIL PROTECTED]
Date: Fri, 4 May 2007 23:17:49 -0400

 This series adds the mac80211 component.  This is the new wireless
 infrastructure for softmac-style wireless hardware.  It originated
 as code contributed by Devicescape, and has been under development by
 the community for well over a year.  Thanks are due especially to Jiri
 Benc and Michael Wu as well as Johannes Berg and a number of other
 contributors who have worked to hammer this into its current form.
 
 This component was in -mm for most of the 2.6.21 cycle, with few
 reported bugs.  The code is also currently available in Fedora rawhide
 where it has performed well.
 
 The wireless developers would like this to be considered for merge
 in time for 2.6.22.  Patches for at least one mac80211-based driver
 will follow shortly.

Applied and pushed out to net-2.6, I'll push this stuff to
Linus, thanks a lot!
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/11][TG3]: Fix TSO bugs.

2007-05-05 Thread David Miller
From: Michael Chan [EMAIL PROTECTED]
Date: Fri, 04 May 2007 17:51:48 -0700

 [TG3]: Fix TSO bugs.
 
 1. Remove the check for skb-len greater than MTU when doing TSO.
 When the destination has a smaller MSS than the source, a TSO packet
 may be smaller than the MTU and we still need to process it as a TSO
 packet.
 
 2. On 5705A3 devices with TSO enabled, the DMA engine can hang due to a
 hardware bug.  This patch avoids the hanging condition by reducing the
 DMA burst size.
 
 Signed-off-by: Matt Carlson [EMAIL PROTECTED]
 Signed-off-by: Michael Chan [EMAIL PROTECTED]

I had a suspicion that TG3 had the same bug BNX2 did. :)

Applied, thanks a lot.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/11][TG3]: Improve NVRAM sizing.

2007-05-05 Thread David Miller
From: Michael Chan [EMAIL PROTECTED]
Date: Fri, 04 May 2007 17:52:26 -0700

 [TG3]: Improve NVRAM sizing.
 
 This patch changes the NVRAM sizing procedure so that the driver can
 take advantage of devices with 1:1 NVRAM strapping configurations.  This
 is useful in cases where the traditional NVRAM sizing method fails.  In
 the event that the flash size cannot be determined, the largest known
 NVRAM size is used.  The patch also removes support for 5755 NVRAM
 devices that are not supported by Broadcom and adds explicit sizing for
 this device.
 
 Signed-off-by: Matt Carlson [EMAIL PROTECTED]
 Signed-off-by: Michael Chan [EMAIL PROTECTED]

Applied.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/11][TG3]: Clear GPIO mask before storing.

2007-05-05 Thread David Miller
From: Michael Chan [EMAIL PROTECTED]
Date: Fri, 04 May 2007 17:52:38 -0700

 [TG3]: Clear GPIO mask before storing.
 
 The GPIO settings may change during reset and so the stored values in
 tp-grc_local_ctrl should be cleared first.
 
 Signed-off-by: Gary Zambrano [EMAIL PROTECTED]
 Signed-off-by: Michael Chan [EMAIL PROTECTED]

Applied.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/11][TG3]: WoL fixes.

2007-05-05 Thread David Miller
From: Michael Chan [EMAIL PROTECTED]
Date: Fri, 04 May 2007 17:52:44 -0700

 [TG3]: WoL fixes.
 
 Change TG3_FLAG_SERDES_WOL_CAP to TG3_FLAG_WOL_CAP to make it easier
 to manage WoL.  This flag is now used consistently during ethtool WoL
 setup and power setting changes.
 
 Signed-off-by: Gary Zambrano [EMAIL PROTECTED]
 Signed-off-by: Michael Chan [EMAIL PROTECTED]

Applied, thanks!
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/11][TG3]: Remove reset during MAC address changes.

2007-05-05 Thread David Miller
From: Michael Chan [EMAIL PROTECTED]
Date: Fri, 04 May 2007 17:52:58 -0700

 [TG3]: Remove reset during MAC address changes.
 
 The reset was added a while back so that ASF could re-init whatever
 MAC address it wanted to use after the MAC address was changed.
 Instead of resetting, we can just keep MAC address 1 unchanged during
 MAC address changes if MAC address 1 is different from MAC address 0.
 
 This fixes 2 problems:
 
 1. Bonding calls set_mac_address in contexts that cannot sleep.
 It no longer sleeps with the chip reset removed.

This is arguably a bonding bug.

 2. When ASF shares the same MAC address as the NIC, it needs to
 always do that even when the MAC address is changed. 
 
 Signed-off-by: Michael Chan [EMAIL PROTECTED]
 

Applied, thanks.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 6/11][TG3]: Eliminate the TG3_FLAG_GOT_SERDES_FLOWCTL flag.

2007-05-05 Thread David Miller
From: Michael Chan [EMAIL PROTECTED]
Date: Fri, 04 May 2007 17:54:01 -0700

 [TG3]: Eliminate the TG3_FLAG_GOT_SERDES_FLOWCTL flag.
 
 This flag does not do anything useful.
 
 Signed-off-by: Michael Chan [EMAIL PROTECTED]

It did do something useful at one point :-)

Applied, thanks.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 7/11][TG3]: Eliminate the TG3_FLAG_5701_REG_WRITE_BUG flag.

2007-05-05 Thread David Miller
From: Christoph Hellwig [EMAIL PROTECTED]
Date: Sat, 5 May 2007 10:46:12 +0100

 On Fri, May 04, 2007 at 05:54:17PM -0700, Michael Chan wrote:
  +   else if (GET_ASIC_REV(tp-pci_chip_rev_id) == ASIC_REV_5701 ||
  +((tp-tg3_flags2  TG3_FLG2_PCI_EXPRESS) 
  + tp-pci_chip_rev_id == CHIPREV_ID_5750_A0)) {
  +   /* Back to back register writes can cause problems on this chip,
  +* the workaround is to read back all reg writes except those to
  +* mailbox regs.  See tg3_write_indirect_reg32().
  +*
  +* PCI Express 5750_A0 rev chips need this workaround too.
  +*/
  tp-write32 = tg3_write_flush_reg32;
 
 This comment is a little odd now.  What about
 
   /*
* Back to back register writes can cause problems on these
* chips, the workaround is to read back all reg writes
* except those to mailbox regs.
*
* See tg3_write_indirect_reg32().
*/
 
 instead?

Looks nicer to me too.  I made this modification and added some
more verbiage to the changelog as suggested by Jeff Garzik when
I applied this, as follows:

commit 98efd8a6be79550767f5a9be6f3db8e7e9b747da
Author: Matt Carlson [EMAIL PROTECTED]
Date:   Sat May 5 12:47:25 2007 -0700

[TG3]: Eliminate the TG3_FLAG_5701_REG_WRITE_BUG flag.

This patch removes the use of the TG3_FLAG_5701_REG_WRITE_BUG flag.
It's logic is only used to set a function pointer and thus the
logic can be collapsed and the flag removed.

[ Comment tidy by Christoph Hellwig. -DaveM ]

Signed-off-by: Matt Carlson [EMAIL PROTECTED]
Signed-off-by: Michael Chan [EMAIL PROTECTED]

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index ff157b7..4154e12 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -10673,17 +10673,6 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
if (GET_CHIP_REV(tp-pci_chip_rev_id) == CHIPREV_5700_BX)
tp-tg3_flags |= TG3_FLAG_TXD_MBOX_HWBUG;
 
-   /* Back to back register writes can cause problems on this chip,
-* the workaround is to read back all reg writes except those to
-* mailbox regs.  See tg3_write_indirect_reg32().
-*
-* PCI Express 5750_A0 rev chips need this workaround too.
-*/
-   if (GET_ASIC_REV(tp-pci_chip_rev_id) == ASIC_REV_5701 ||
-   ((tp-tg3_flags2  TG3_FLG2_PCI_EXPRESS) 
-tp-pci_chip_rev_id == CHIPREV_ID_5750_A0))
-   tp-tg3_flags |= TG3_FLAG_5701_REG_WRITE_BUG;
-
if ((pci_state_reg  PCISTATE_BUS_SPEED_HIGH) != 0)
tp-tg3_flags |= TG3_FLAG_PCI_HIGH_SPEED;
if ((pci_state_reg  PCISTATE_BUS_32BIT) != 0)
@@ -10707,8 +10696,19 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
/* Various workaround register access methods */
if (tp-tg3_flags  TG3_FLAG_PCIX_TARGET_HWBUG)
tp-write32 = tg3_write_indirect_reg32;
-   else if (tp-tg3_flags  TG3_FLAG_5701_REG_WRITE_BUG)
+   else if (GET_ASIC_REV(tp-pci_chip_rev_id) == ASIC_REV_5701 ||
+((tp-tg3_flags2  TG3_FLG2_PCI_EXPRESS) 
+ tp-pci_chip_rev_id == CHIPREV_ID_5750_A0)) {
+   /*
+* Back to back register writes can cause problems on these
+* chips, the workaround is to read back all reg writes
+* except those to mailbox regs.
+*
+* See tg3_write_indirect_reg32().
+*/
tp-write32 = tg3_write_flush_reg32;
+   }
+
 
if ((tp-tg3_flags  TG3_FLAG_TXD_MBOX_HWBUG) ||
(tp-tg3_flags  TG3_FLAG_MBOX_WRITE_REORDER)) {
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index dd04a46..c52acb0 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -2199,7 +2199,6 @@ struct tg3 {
 #define TG3_FLAG_USE_LINKCHG_REG   0x0008
 #define TG3_FLAG_USE_MI_INTERRUPT  0x0010
 #define TG3_FLAG_ENABLE_ASF0x0020
-#define TG3_FLAG_5701_REG_WRITE_BUG0x0040
 #define TG3_FLAG_POLL_SERDES   0x0080
 #define TG3_FLAG_MBOX_WRITE_REORDER0x0100
 #define TG3_FLAG_PCIX_TARGET_HWBUG 0x0200
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] add mac80211 wireless infrastructure

2007-05-05 Thread John W. Linville
On Fri, May 04, 2007 at 10:57:21PM -0700, David Miller wrote:

 Dammit John, get that tuxdriver.com spam filter fixed!
 :-)

:-) Nah, I think it was my clumsy hand-editing of some mail headers.
I must remember to let the machine do the work...

John
-- 
John W. Linville
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/4] add mac80211 wireless infrastructure

2007-05-05 Thread John W. Linville
On Sat, May 05, 2007 at 10:33:36AM +0100, Christoph Hellwig wrote:
 On Fri, May 04, 2007 at 11:17:49PM -0400, John W. Linville wrote:

  This component was in -mm for most of the 2.6.21 cycle, with few
  reported bugs.  The code is also currently available in Fedora rawhide
  where it has performed well.
  
  The wireless developers would like this to be considered for merge
  in time for 2.6.22.  Patches for at least one mac80211-based driver
  will follow shortly.
 
 Please send out patches for review first.  Last time I looked through
 the stuff in -mm there were a lot of things that were in pretty bad
 shape still.

I had a little email trouble w/ the orignal patch post.  I hand edited
some headers and I must have screwed them up.

Anyway, the patches have been reposted and they seem to have made
it through to the list.  Please do look at them -- I'm sure they can
benefit from your loving eye.  :-)

The patches are also available here:


http://www.kernel.org/pub/linux/kernel/people/linville/wireless-2.6/mac80211/

I realize this is a bit late in the merge cycle -- this timing is the
best we could manage.  If the patches are fatally flawed then we can
try for 2.6.23.  But if possible, we would like to get them into the
current cycle.

FWIW, the patches have been paired-down a bit from what is in -mm,
including the removal of AP and WDS mode support and related ioctls.

John
-- 
John W. Linville
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 8/11][TG3]: Add TG3_FLAG_SUPPORT_MSI flag.

2007-05-05 Thread David Miller
From: Jeff Garzik [EMAIL PROTECTED]
Date: Fri, 04 May 2007 20:38:43 -0400

 Michael Chan wrote:
  @@ -10404,6 +10400,8 @@ static void __devinit tg3_read_fw_ver(struct tg3 
  *tp)
  }
   }
   
  +static struct pci_dev * __devinit tg3_find_peer(struct tg3 *);
  +
   static int __devinit tg3_get_invariants(struct tg3 *tp)
   {
  static struct pci_device_id write_reorder_chipsets[] = {
 
 
 Prototypes are better kept at the top of the file, grouped together.  It 
 can sometimes be a pain later on, if they are scattered throughout a big 
 source file like tg3.c.
 
 ACK the patch's content of course

I disagree with this.  In my drivers I try to keep the forward
declarations as far down in the file as possible, so that functions
are only visible to the stuff that actually needs it.

In any event, even if I agreed with this idea, the tg3.c driver
has not followed that convention and such a switch over
would be a seperate change.

Patch applied, thanks Michael.

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 9/11][TG3]: Add ASPM workaround.

2007-05-05 Thread David Miller
From: Jeff Garzik [EMAIL PROTECTED]
Date: Fri, 04 May 2007 20:40:09 -0400

 Michael Chan wrote:
  --- a/drivers/net/tg3.c
  +++ b/drivers/net/tg3.c
  @@ -3019,6 +3019,15 @@ static int tg3_setup_phy(struct tg3 *tp, int 
  force_reset)
  }
  }
   
  +   if (tp-tg3_flags  TG3_FLAG_ASPM_WORKAROUND) {
  +   u32 val = tr32(0x7d28);
  +   if (!netif_carrier_ok(tp-dev))
  +   val = (val  ~0xff00) | tp-pwrmgmt_thresh;
  +   else
  +   val |= 0xff00;
  +   tw32(0x7d28, val);
  +   }
  +
  return err;
   }
   
  @@ -10997,6 +11016,9 @@ static int __devinit tg3_get_invariants(struct tg3 
  *tp)
   */
  tp-tg3_flags = ~TG3_FLAG_WOL_ENABLE;
   
  +   if (tp-tg3_flags  TG3_FLAG_ASPM_WORKAROUND)
  +   tp-pwrmgmt_thresh = tr32(0x7d28)  0xff00;
 
 
 NAK -- magic numbers.
 
 Please create a named constant for the register at 0x7d28.

Agree, please fix this patch up Michael.

Thanks.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 10/11][TG3]: Reduce spurious interrupts.

2007-05-05 Thread Michael Chan
On Fri, 2007-05-04 at 20:47 -0700, David Miller wrote:
 From: Michael Chan [EMAIL PROTECTED]
 Date: Fri, 4 May 2007 19:50:10 -0700
 
  In a small number of cases, we really get a ton of spurious interrupts.
  We have even seen the kernel shutting off IRQ7 because of too many
  unclaimed spurious interrupts.
 
 Ok, that's a big problem.
 
 In retrospect the read back is only needed on non-MSI
 right?  I guess that'd be ok.
 
Right, not needed in MSI as MSI is considered an edge interrupt.  I will
resubmit a new patch to just flush the mailbox.

-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH revised 9/11][TG3]: Add ASPM workaround.

2007-05-05 Thread Michael Chan
[TG3]: Add ASPM workaround.

This patch adds workaround to fix performance problems caused by slow
PCIE L1-L0 transitions on ICH8 platforms.

Changed all magic numbers to constants as suggested by Jeff Garzik.

Signed-off-by: Matt Carlson [EMAIL PROTECTED]
Signed-off-by: Michael Chan [EMAIL PROTECTED]

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 59d6e74..da1ab01 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -3019,6 +3019,16 @@ static int tg3_setup_phy(struct tg3 *tp, int force_reset)
}
}
 
+   if (tp-tg3_flags  TG3_FLAG_ASPM_WORKAROUND) {
+   u32 val = tr32(PCIE_PWR_MGMT_THRESH);
+   if (!netif_carrier_ok(tp-dev))
+   val = (val  ~PCIE_PWR_MGMT_L1_THRESH_MSK) |
+ tp-pwrmgmt_thresh;
+   else
+   val |= PCIE_PWR_MGMT_L1_THRESH_MSK;
+   tw32(PCIE_PWR_MGMT_THRESH, val);
+   }
+
return err;
 }
 
@@ -10004,6 +10014,8 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 
*tp)
tp-tg3_flags = ~TG3_FLAG_EEPROM_WRITE_PROT;
tp-tg3_flags2 |= TG3_FLG2_IS_NIC;
}
+   if (tr32(VCPU_CFGSHDW)  VCPU_CFGSHDW_ASPM_DBNC)
+   tp-tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
return;
}
 
@@ -10131,6 +10143,14 @@ static void __devinit tg3_get_eeprom_hw_cfg(struct tg3 
*tp)
/* bootcode if bit 18 is set */
if (cfg2  (1  18))
tp-tg3_flags2 |= TG3_FLG2_SERDES_PREEMPHASIS;
+
+   if (tp-tg3_flags2  TG3_FLG2_PCI_EXPRESS) {
+   u32 cfg3;
+
+   tg3_read_mem(tp, NIC_SRAM_DATA_CFG_3, cfg3);
+   if (cfg3  NIC_SRAM_ASPM_DEBOUNCE)
+   tp-tg3_flags |= TG3_FLAG_ASPM_WORKAROUND;
+   }
}
 }
 
@@ -10998,6 +11018,10 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
 */
tp-tg3_flags = ~TG3_FLAG_WOL_ENABLE;
 
+   if (tp-tg3_flags  TG3_FLAG_ASPM_WORKAROUND)
+   tp-pwrmgmt_thresh = tr32(PCIE_PWR_MGMT_THRESH) 
+PCIE_PWR_MGMT_L1_THRESH_MSK;
+
return err;
 }
 
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index dcdfc08..4d334cf 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -1150,6 +1150,9 @@
 #define  VCPU_STATUS_INIT_DONE  0x0400
 #define  VCPU_STATUS_DRV_RESET  0x0800
 
+#define VCPU_CFGSHDW   0x5104
+#define  VCPU_CFGSHDW_ASPM_DBNC 0x1000
+
 /* Mailboxes */
 #define GRCMBOX_BASE   0x5600
 #define GRCMBOX_INTERRUPT_00x5800 /* 64-bit */
@@ -1507,6 +1510,8 @@
 #define PCIE_TRANS_CFG_1SHOT_MSI0x2000
 #define PCIE_TRANS_CFG_LOM  0x0020
 
+#define PCIE_PWR_MGMT_THRESH   0x7d28
+#define PCIE_PWR_MGMT_L1_THRESH_MSK 0xff00
 
 #define TG3_EEPROM_MAGIC   0x669955aa
 #define TG3_EEPROM_MAGIC_FW0xa500
@@ -1593,6 +1598,9 @@
 #define  SHASTA_EXT_LED_MAC 0x0001
 #define  SHASTA_EXT_LED_COMBO   0x00018000
 
+#define NIC_SRAM_DATA_CFG_30x0d3c
+#define  NIC_SRAM_ASPM_DEBOUNCE 0x0002
+
 #define NIC_SRAM_RX_MINI_BUFFER_DESC   0x1000
 
 #define NIC_SRAM_DMA_DESC_POOL_BASE0x2000
@@ -2200,6 +2208,7 @@ struct tg3 {
 #define TG3_FLAG_USE_LINKCHG_REG   0x0008
 #define TG3_FLAG_USE_MI_INTERRUPT  0x0010
 #define TG3_FLAG_ENABLE_ASF0x0020
+#define TG3_FLAG_ASPM_WORKAROUND   0x0040
 #define TG3_FLAG_POLL_SERDES   0x0080
 #define TG3_FLAG_MBOX_WRITE_REORDER0x0100
 #define TG3_FLAG_PCIX_TARGET_HWBUG 0x0200
@@ -2288,6 +2297,7 @@ struct tg3 {
u32 grc_local_ctrl;
u32 dma_rwctrl;
u32 coalesce_mode;
+   u32 pwrmgmt_thresh;
 
/* PCI block */
u16 pci_chip_rev_id;


-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH revised 10/11][TG3]: Eliminate spurious interrupts.

2007-05-05 Thread Michael Chan
[TG3]: Eliminate spurious interrupts.

Spurious interrupts are often encountered especially on systems
using the 8259 PIC mode.  This is because the I/O write to deassert
the interrupt is posted and won't get to the chip immediately.  As
a result, the IRQ may remain asserted after the IRQ handler exits,
causing spurious interrupts.

Flush the interrupt mailbox in non-MSI handlers to de-assert the
IRQ immediately.  This seems to be the most straight forward approach
after discussion with Jeff Garzik and David Miller.

Signed-off-by: Michael Chan [EMAIL PROTECTED]

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index da1ab01..70b8c5e 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -3590,8 +3590,12 @@ static irqreturn_t tg3_interrupt(int irq, void *dev_id)
 * Writing non-zero to intr-mbox-0 additional tells the
 * NIC to stop sending us irqs, engaging in-intr-handler
 * event coalescing.
+*
+* Flush the mailbox to de-assert the IRQ immediately to prevent
+* spurious interrupts.  The flush impacts performance but
+* excessive spurious interrupts can be worse in some cases.
 */
-   tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x0001);
+   tw32_mailbox_f(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x0001);
if (tg3_irq_sync(tp))
goto out;
sblk-status = ~SD_STATUS_UPDATED;
@@ -3635,8 +3639,12 @@ static irqreturn_t tg3_interrupt_tagged(int irq, void 
*dev_id)
 * writing non-zero to intr-mbox-0 additional tells the
 * NIC to stop sending us irqs, engaging in-intr-handler
 * event coalescing.
+*
+* Flush the mailbox to de-assert the IRQ immediately to prevent
+* spurious interrupts.  The flush impacts performance but
+* excessive spurious interrupts can be worse in some cases.
 */
-   tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x0001);
+   tw32_mailbox_f(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x0001);
if (tg3_irq_sync(tp))
goto out;
if (netif_rx_schedule_prep(dev)) {


-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH revised 11/11][TG3]: Update version and reldate.

2007-05-05 Thread Michael Chan
[TG3]: Update version and reldate.

Update version to 3.76.

Signed-off-by: Michael Chan [EMAIL PROTECTED]

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 70b8c5e..184c275 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -64,8 +64,8 @@
 
 #define DRV_MODULE_NAMEtg3
 #define PFX DRV_MODULE_NAME: 
-#define DRV_MODULE_VERSION 3.75
-#define DRV_MODULE_RELDATE March 23, 2007
+#define DRV_MODULE_VERSION 3.76
+#define DRV_MODULE_RELDATE May 5, 2007
 
 #define TG3_DEF_MAC_MODE   0
 #define TG3_DEF_RX_MODE0


-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Merging SSB upstream

2007-05-05 Thread Michael Buesch
So, now that mac80211 is merged upstream, I think it's
time to merge SSB and the b44-ssb port upstream.
Note that bcm43xx-mac80211 is _not_ ready for upstream, yet.

What do you think? I'd like to merge ssb as-is, although
the embedded-device parts are not quite finished, yet.
But they don't interfere with the non-embedded parts used
by b44 and the bcm43xx PCI cards.
So we _could_ remove the ssb-mips code, but I don't like to
do that for better maintainability. It doesn't hurt anyone IMO.

Some opinions?

-- 
Greetings Michael.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Merging SSB upstream

2007-05-05 Thread John W. Linville
On Sun, May 06, 2007 at 03:03:17AM +0200, Michael Buesch wrote:
 So, now that mac80211 is merged upstream, I think it's
 time to merge SSB and the b44-ssb port upstream.
 Note that bcm43xx-mac80211 is _not_ ready for upstream, yet.
 
ACK, unfortunately.

 What do you think? I'd like to merge ssb as-is, although
 the embedded-device parts are not quite finished, yet.
 But they don't interfere with the non-embedded parts used
 by b44 and the bcm43xx PCI cards.

How much testing have you (and others) done w/ b44?  I had to remove
the b44 ssb changes from fedora because a) users reported problems;
and b) I was more worried about wireless than b44+ssb. (sorry!)

So, has anyone been using b44 in -mm?

 So we _could_ remove the ssb-mips code, but I don't like to
 do that for better maintainability. It doesn't hurt anyone IMO.

I guess I don't see a problem w/ merging the mips part, as long as the
b44 part has been thoroughly tested.  I wonder if Ralf has an opinion?

John
-- 
John W. Linville
[EMAIL PROTECTED]
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Merging SSB upstream

2007-05-05 Thread Jeff Garzik

Michael Buesch wrote:

So, now that mac80211 is merged upstream, I think it's
time to merge SSB and the b44-ssb port upstream.
Note that bcm43xx-mac80211 is _not_ ready for upstream, yet.

What do you think? I'd like to merge ssb as-is, although
the embedded-device parts are not quite finished, yet.
But they don't interfere with the non-embedded parts used
by b44 and the bcm43xx PCI cards.
So we _could_ remove the ssb-mips code, but I don't like to
do that for better maintainability. It doesn't hurt anyone IMO.


What does Ralf (MIPS maintainer) and Gary (Broadcom maintainer) think?

For my part, I'm not going to render even a tentative opinion without a 
link to actual code.


Last I saw of the code, and descriptions in IRC, it sounded sane.

Jeff



-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html