Re: tg3 does not want to go up (config space problems).

2007-05-14 Thread Michael Chan
On Mon, 2007-05-14 at 18:54 +0400, Evgeniy Polyakov wrote: I've cought a problem with my laptop and tg3 driver. Suddenly (it was turned off quite for a while) tg3 driver does not start up. Here is dmesg messages (copied by hand, some bits are ommitted): acpi: ... // device enbaled in

Re: tg3 does not want to go up (config space problems).

2007-05-14 Thread Michael Chan
On Mon, 2007-05-14 at 10:15 -0700, Michael Chan wrote: On Mon, 2007-05-14 at 18:54 +0400, Evgeniy Polyakov wrote: This problem never happend before, but suddenly appeared after quite long suspend to disk (several month I think). Nothing was changed in hardware. Both 2.6.18 and 2.6.21-rc3

Re: [RFC] New driver API to speed up small packets xmits

2007-05-15 Thread Michael Chan
On Tue, 2007-05-15 at 13:52 -0700, Roland Dreier wrote: Well, IPoIB doesn't do netif_wake_queue() until half the device's TX queue is free, so we should get batching. However, I'm not sure that I can count on a fudge factor ensuring that there's enough space to handle everything

Re: [RFC] New driver API to speed up small packets xmits

2007-05-15 Thread Michael Chan
On Tue, 2007-05-15 at 14:08 -0700, Roland Dreier wrote: Well, IPoIB doesn't do netif_wake_queue() until half the device's TX queue is free, so we should get batching. However, I'm not sure that I can count on a fudge factor ensuring that there's enough space to handle everything

Re: intermittant petabyte usage reported with broadcom nic

2007-05-21 Thread Michael Chan
On Mon, 2 Apr 2007 11:43:19 +1000 CaT [EMAIL PROTECTED] wrote: I take minute by minute snapshots of network traffic by sampling /proc/net/dev and most of the time everything works fine. Occasionally though I get petabyte byte traffic and corresponding packet traffic. We were able to

Re: Definition and usage of NETIF_F_HW_SUM?

2007-05-29 Thread Michael Chan
On Wed, 2007-05-30 at 07:36 +1000, Herbert Xu wrote: I just checked e1000 and it's correct as it does use the csum_offset when doing TX offload. However, you're definitely right that bnx2 seems to be broken. A few devices take a offset, starting point, and insertion point. This looks

[TG3]: Fix link problem on Dell's onboard 5906.

2007-05-31 Thread Michael Chan
to use the more efficient interrupt-driven link changes. Update version to 3.77. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 923b9c7..a16954c 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -64,8 +64,8 @@ #define

[3/5][BNX2]: Enable DMA on 5709.

2007-06-04 Thread Michael Chan
[BNX2]: Enable DMA on 5709. Add missing code to enable DMA on 5709 A1. The bit is a no-op on A0 and therefore can be set on all 5709 chips. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index daa62d9..c03282c 100644 --- a/drivers/net/bnx2.c

[1/5][BNX2]: Fix netdev watchdog on 5708.

2007-06-04 Thread Michael Chan
to initialize the 2nd halves of all context memory. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 88b33c6..5d69e5b 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -1811,6 +1811,7 @@ bnx2_init_context(struct bnx2 *bp) vcid = 96

[5/5][BNX2]: Update version and reldate.

2007-06-04 Thread Michael Chan
[BNX2]: Update version and reldate. Update to version 1.5.11. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 58e6f49..a9b833b 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -54,8 +54,8 @@ #define DRV_MODULE_NAME

[4/5][BNX2]: Fix occasional counter corruption on 5708.

2007-06-04 Thread Michael Chan
for ethtool -C statistics block. Thanks to Jean-Daniel Pauget [EMAIL PROTECTED] and CaT [EMAIL PROTECTED] for reporting this rare problem. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index c03282c..5654cc7 100644 --- a/drivers/net/bnx2.c +++ b

[2/5][BNX2]: Add missing wait in bnx2_init_5709_context().

2007-06-04 Thread Michael Chan
[BNX2]: Add missing wait in bnx2_init_5709_context(). For correctness, we need to wait for the MEM_INIT bit to be cleared in the BNX2_CTX_COMMAND register before proceeding. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 5d69e5b..daa62d9

Re: [2/5 revised][BNX2]: Add missing wait in bnx2_init_5709_context().

2007-06-04 Thread Michael Chan
[BNX2]: Add missing wait in bnx2_init_5709_context(). For correctness, we need to wait for the MEM_INIT bit to be cleared in the BNX2_CTX_COMMAND register before proceeding. [Added return -EBUSY when the MEM_INIT bit doesn't clear, suggested by Jeff Garzik.] Signed-off-by: Michael Chan [EMAIL

Re: bnx2 driver reports WoL not supported when it actually works

2007-06-07 Thread Michael Chan
Tim Mann wrote: Hi, Michael. We have some IBM blades with a BCM5708-based dual-port NIC that the bnx2 driver reports as not supporting wake-on-LAN. (Ethtool says Supports Wake-on: d.) However, IBM says that WoL is supported by these NICs, and in fact when I tried putting the blade into

Re: [WIP][PATCHES] Network xmit batching - tg3 support

2007-07-02 Thread Michael Chan
On Mon, 2007-07-02 at 14:20 -0700, Matt Carlson wrote: Also, I think the count, max_per_txd, and nr_frags fields of the tg3_tx_cbdata struct are not needed. The count field is not needed also. +struct tg3_tx_cbdata { + u32 base_flags; + int count; + unsigned int

[2.6.23 1/9][BNX2]: Add bnx2_set_default_link().

2007-07-06 Thread Michael Chan
[BNX2]: Add bnx2_set_default_link(). Put existing code to setup the default link settings in this new function. This makes it easier to support the remote PHY feature in the next few patches. Also change ETHTOOL_ALL_FIBRE_SPEED to include 2500Mbps if supported. Signed-off-by: Michael Chan

[2.6.23 2/9][BNX2]: Add remote PHY bit definitions.

2007-07-06 Thread Michael Chan
[BNX2]: Add remote PHY bit definitions. Add new fields in struct bnx2 and other bit definitions in shared memory to support remote PHY. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index 49a5de2..14c0a1e 100644 --- a/drivers/net/bnx2.h +++ b

[2.6.23 3/9][BNX2]: Add support for remote PHY.

2007-07-06 Thread Michael Chan
remote PHY is present, the 5708S Serdes device practically becomes a copper device with full control over the 1000Base-T link settings. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 56bc41e..3268d16 100644 --- a/drivers/net/bnx2.c +++ b

[2.6.23 4/9][BNX2]: Add ethtool support for remote PHY.

2007-07-06 Thread Michael Chan
remote PHY. mii-tool operations are not supported on remote PHY and we will return -EOPNOTSUPP. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 3268d16..514ad32 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -5363,17 +5363,25

[2.6.23 5/9][BNX2]: Modify link up message.

2007-07-06 Thread Michael Chan
[BNX2]: Modify link up message. Modify the link up dmesg to report remote copper or Serdes link. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 514ad32..dc6dcf5 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -604,12 +604,21

[2.6.23 6/9][BNX2]: Reduce spurious INTA interrupts.

2007-07-06 Thread Michael Chan
-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index dc6dcf5..48f5151 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -2547,6 +2547,7 @@ bnx2_interrupt(int irq, void *dev_instance) { struct net_device *dev = dev_instance; struct bnx2

[2.6.23 7/9][BNX2]: Enhance the heartbeat.

2007-07-06 Thread Michael Chan
this patch last time and we decided that the -rt kernel problem alone did not justify this patch. I think the netpoll problem makes this patch necessary. ] Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 48f5151..3163868 100644 --- a/drivers

[2.6.23 8/9][BNX2]: Print management firmware version.

2007-07-06 Thread Michael Chan
[BNX2]: Print management firmware version. Add management firmware version for ethtool -i. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 3163868..a3ae3b0 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -5546,11 +5546,7

[2.6.23 9/9][BNX2]: Update version to 1.6.2.

2007-07-06 Thread Michael Chan
[BNX2]: Update version to 1.6.2. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index a3ae3b0..c590d8c 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -54,8 +54,8 @@ #define DRV_MODULE_NAMEbnx2 #define PFX

[PATCH 2.6 0/5] tg3: Add indirect register access for 5703

2005-07-27 Thread Michael Chan
A set of patches will follow that adds the last remaining register access workaround for 5703 behind certain ICH bridges. The first 3 patches add the infrastructure to use function pointers for various register access methods. Patch #4 adds the new indirect register access method. It turns out

[PATCH 2.6 1/5] tg3: Add basic register access function pointers

2005-07-27 Thread Michael Chan
on chips that use normal register access methods. The various register read write macros (e.g. tw32, tr32, tw32_mailbox) are redefined to call the function pointers. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -Nrup 1/drivers/net/tg3.c 2/drivers/net/tg3.c --- 1/drivers/net/tg3.c 2005-07-25 20

[PATCH 2.6 4/5] tg3: Add indirect register method for 5703 behind ICH

2005-07-27 Thread Michael Chan
to drive non-zero addresses during special cycles. The indirect_lock is also changed to spin_lock_irqsave from spin_lock_bh because it is used in irq handler when using the indirect method to disable interrupts. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -Nrup 4/drivers/net/tg3.c 5/drivers

[PATCH 2.6 5/5] tg3: Eliminate one register write in tg3_restart_ints()

2005-07-27 Thread Michael Chan
The register write to register 0x68 to restart interrupts is unnecessary as the interrupt wasn't masked in that register by the irq handler. This will save one register write in the fast path. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -Nrup 5/drivers/net/tg3.c 6/drivers/net/tg3.c --- 5

Re: [PATCH 2.6 1/5] tg3: Add basic register access function pointers

2005-07-27 Thread Michael Chan
Jeff Garzik wrote: Is this theory, or it has been actually measured? In x86-based CPUs at least (the largest tg3 platform), branch prediction often prefers if (...) direct_func_1() else direct_func_2() to tp-func() For hot

[PATCH 2.6 6/5] tg3: Fix bug in setting a tg3_flag

2005-07-28 Thread Michael Chan
Found a bug while reviewing the patches the second time. The TG3_FLAG_TXD_MBOX_HWBUG flag is set after the register access methods have been determined. This patch fixes it by moving it up before the various access methods are assigned. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -Nrup 6

Re: [PATCH] drivers/net/bnx2.c Possible sparse fixes

2005-08-08 Thread Michael Chan
On Tue, 2005-08-09 at 01:09 +0200, Peter Hagervall wrote: This patch contains the following possible cleanups/fixes: - use C99 struct initializers - make a few arrays and structs static - remove a few uses of literal 0 as NULL pointer - add __force attribute in cast to silence sparse -

Re: [BUG] tg3 v3.26 patch and FIBRE partno(A7109-6)

2005-08-19 Thread Michael Chan
on older 570x chips where the MII interface is not used on SerDes chips. On newer chips such as the 5780 that use MII for both copper and SerDes, SerDes detection must rely on the eeprom. This patch will make the SerDes detection identical to versions 3.25 and older. Signed-off-by: Michael Chan

[PATCH 1/5] bnx2: Fix rtnl deadlock in bnx2_close

2005-08-24 Thread Michael Chan
if we are in the reset task which is run from the workqueue. bnx2_close() will loop until the flag is cleared. flush_scheduled_work() is also moved to bnx2_remove_one() before the netdev is freed. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -rup a/drivers/net/bnx2.c b/drivers/net/bnx2.c

[PATCH 2/5] bnx2: speedup serdes linkup

2005-08-24 Thread Michael Chan
. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -rup b/drivers/net/bnx2.c c/drivers/net/bnx2.c --- b/drivers/net/bnx2.c2005-08-24 07:13:25.0 -0700 +++ c/drivers/net/bnx2.c2005-08-24 07:22:12.0 -0700 @@ -806,7 +806,19 @@ bnx2_setup_serdes_phy(struct bnx2 *bp

[PATCH 3/5] bnx2: remove atomics in tx

2005-08-24 Thread Michael Chan
Remove atomic operations in the fast tx path. Expensive atomic operations were used to keep track of the number of available tx descriptors. This uses the difference between the consumer and producer index to determine the number of free tx descriptors. Signed-off-by: Michael Chan [EMAIL

[PATCH 5/5] bnx2: update version and minor fixes

2005-08-24 Thread Michael Chan
Update version and add 2 minor fixes: check for a valid ethernet address before setting it and zero out bp-regview if init_one encounters an error and unmaps the IO address. The 2nd fix prevents remove_one from unmapping again. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -rup e/drivers

[PATCH 4/5] bnx2: change irq locks to bh locks

2005-08-24 Thread Michael Chan
Change all locks from spin_lock_irqsave() to spin_lock_bh(). All places that require spinlocks are in BH context. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -rup d/drivers/net/bnx2.c e/drivers/net/bnx2.c --- d/drivers/net/bnx2.c2005-08-24 07:24:37.0 -0700 +++ e/drivers

[PATCH 1/5 updated] bnx2: Fix rtnl deadlock in bnx2_close

2005-08-24 Thread Michael Chan
is freed. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -rup a/drivers/net/bnx2.c b/drivers/net/bnx2.c --- a/drivers/net/bnx2.c2005-08-19 10:46:53.0 -0700 +++ b/drivers/net/bnx2.c2005-08-24 11:59:51.0 -0700 @@ -3975,12 +3975,17 @@ bnx2_reset_task(void *data

[PATCH 2/5 updated] bnx2: speedup serdes linkup

2005-08-24 Thread Michael Chan
(). An eeprom bit is also added to allow default forced SerDes speed for even faster link-up time. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -rup b/drivers/net/bnx2.c c/drivers/net/bnx2.c --- b/drivers/net/bnx2.c2005-08-24 11:59:51.0 -0700 +++ c/drivers/net/bnx2.c

[PATCH 5/5 updated] bnx2: update version and minor fixes

2005-08-24 Thread Michael Chan
() instead of hand coding the same. 4. use IRQ_HANDLED and IRQ_NONE. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -rup e/drivers/net/bnx2.c f/drivers/net/bnx2.c --- e/drivers/net/bnx2.c2005-08-24 12:09:36.0 -0700 +++ f/drivers/net/bnx2.c2005-08-24 12:22:45.0 -0700

Re: Perf problem with qdisc ? dev_queue_xmit_nit() can be called many times for the same packet

2005-08-29 Thread Michael Chan
. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -urp a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2005-08-29 09:00:16.0 -0700 +++ b/drivers/net/tg3.c 2005-08-29 13:14:55.0 -0700 @@ -121,12 +121,9 @@ TG3_RX_RCB_RING_SIZE(tp

[PATCH net-2.6 1/5] tg3: minor 5780 and 5752 fixes

2005-09-02 Thread Michael Chan
Minor SerDes bug fixes for 5780S and nvram bug fixes for 5780 and 5752. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -urp a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2005-09-02 14:42:39.0 -0700 +++ b/drivers/net/tg3.c 2005-09-02 14:47:31.0 -0700

[PATCH net-2.6 2/5] tg3: add ethtool -p

2005-09-02 Thread Michael Chan
Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -urp b/drivers/net/tg3.c c/drivers/net/tg3.c --- b/drivers/net/tg3.c 2005-09-02 14:47:31.0 -0700 +++ c/drivers/net/tg3.c 2005-09-02 14:49:47.0 -0700 @@ -7559,6 +7559,38 @@ static void tg3_get_strings (struct net_

[PATCH net-2.6 4/5] tg3: Remove status block access in tg3_msi() and add prefetches

2005-09-02 Thread Michael Chan
prefetches for the next rx descriptors are added. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -urp d/drivers/net/tg3.c e/drivers/net/tg3.c --- d/drivers/net/tg3.c 2005-09-02 14:51:11.0 -0700 +++ e/drivers/net/tg3.c 2005-09-02 14:55:30.0 -0700 @@ -36,6 +36,7 @@ #include

[PATCH net-2.6 5/5] tg3: Use status tag to check for new events

2005-09-02 Thread Michael Chan
to determine if there are new events. The tp-lock around netif_rx_complete() and tg3_restart_ints() is also removed. It is unnecessary with DaveM's new locking scheme. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -urp e/drivers/net/tg3.c f/drivers/net/tg3.c --- e/drivers/net/tg3.c 2005-09-02 14

[PATCH] bnx2: Fix bug in irq handler and add prefetch

2005-09-08 Thread Michael Chan
it will speed up bnx2_poll() that will run on the same CPU that received the MSI. Update version. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -rup a/drivers/net/bnx2.c b/drivers/net/bnx2.c --- a/drivers/net/bnx2.c2005-09-07 09:46:32.0 -0700 +++ b/drivers/net/bnx2.c2005-09-07

[PATCH] ethtool: Format register dump for tg3

2005-11-08 Thread Michael Chan
Format output of ethtool -d for tg3 devices to make it more readable. Each register is displayed as a 32-bit value and the undefined regions in the register space are skipped. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff -rup ethtool-3.a/ethtool.c ethtool-3.b/ethtool.c --- ethtool-3

Re: [patch 3/3] bnx2: avoid possible overflows in bnx2_get_eeprom

2005-11-09 Thread Michael Chan
On Wed, 2005-11-09 at 16:39 -0500, John W. Linville wrote: Avoid possible overflows when validating eeprom-offset and eeprom-len against bp-flash_info-total_size in bnx2_get_eeprom. It looks like net/core/ethtool.c already has sufficient checking of the offset and length parameters so I think

Re: tg3: tg3_stop_block timed out

2006-09-04 Thread Michael Chan
Philip Molter wrote: Is there any additional information that I can give to help get some more work targeted at this bug? I've been getting this lockup three or four times a week per server (I have four of them exhibiting this behavior). The network setup is fairly complicated, but

Re: TG3 data corruption (TSO ?)

2006-09-08 Thread Michael Chan
Copying netdev. Benjamin Herrenschmidt wrote: Hi ! I've been chasing with Segher a data corruption problem lately. Basically transferring huge amount of data (several Gb) and I get corrupted data at the rx side. I cannot tell for sure wether what I've been observing here is the same

Re: capturing packets with FCS error (tg3)

2006-09-08 Thread Michael Chan
On Fri, 2006-09-08 at 16:04 -0400, Sabit A. Sayeed wrote: Is it possible to capture packets with FCS error using the tg3 driver? Yes, you'll need to set the RX_MODE_NO_CRC_CHECK in the MAC_RX_MODE register. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a

Re: TG3 data corruption (TSO ?)

2006-09-08 Thread Michael Chan
On Fri, 2006-09-08 at 21:29 +0200, Segher Boessenkool wrote: I've got a patch that seems so solve the problem, it needs more testing though (maybe Ben can do this :-) ). The problem is that there should be quite a few wmb()'s in the code that are just not there; adding some to tg3_set_txd()

Re: TG3 data corruption (TSO ?)

2006-09-08 Thread Michael Chan
On Sat, 2006-09-09 at 07:41 +1000, Benjamin Herrenschmidt wrote: As for the tcpdump output, well, I have a 3Gb file for now :) I need to do a bit of surgery on it to get only the interesting part. I'll try to do that later today (but it may have to wait for monday). Ben, We probably don't

Re: TG3 data corruption (TSO ?)

2006-09-08 Thread Michael Chan
On Sat, 2006-09-09 at 07:46 +1000, Benjamin Herrenschmidt wrote: The PowerPC writel has a full sync _after_ the write, mostly to prevent it from leaking out of a spinlock, and for ordering it vs. other writel's or readl's. It doesn't provide any ordering guarantee vs cacheable storage (and

Re: TG3 data corruption (TSO ?)

2006-09-08 Thread Michael Chan
On Sat, 2006-09-09 at 08:25 +1000, Benjamin Herrenschmidt wrote: Ok. I'm trying to figure out what's the best way with fixing that. I can see the flamewar coming on wether stores to memory vs. writel shall be ordered or not :) I'm very reluctant to add another sync instruction to our writel

Re: TG3 data corruption (TSO ?)

2006-09-10 Thread Michael Chan
Benjamin Herrenschmidt wrote: I've added a wmb() in tw32_rx_mbox() and tw32_tx_mbox() and can still reproduce the problem. I've also done a 2 days run without TSO enabled without a failure (my test program normally fails after a couple of minutes). Hi Ben, The code is a bit tricky. It

Re: TG3 data corruption (TSO ?)

2006-09-10 Thread Michael Chan
Benjamin Herrenschmidt wrote: I've done: #define tw32_rx_mbox(reg, val)do { wmb(); tp-write32_rx_mbox(tp, reg, val); } while(0) #define tw32_tx_mbox(reg, val)do { wmb(); tp-write32_tx_mbox(tp, reg, val); } while(0) That should do it. I think we need those tcpdump after

Re: tg3 driver timeout problems

2006-09-11 Thread Michael Chan
On Mon, 2006-09-11 at 11:18 -0700, sunny12 wrote: A restart of the network using /etc/init.d/network restart does the trick and the device works again. I dont think this is related to the TSO problem reported earlier because I believe its disabled by default. TSO may be on by default on

Re: TG3 data corruption (TSO ?)

2006-09-11 Thread Michael Chan
On Mon, 2006-09-11 at 15:52 +1000, Benjamin Herrenschmidt wrote: Looks like adding a sync to writel does fix it though... I'm trying to figure out which specific writel in the driver makes a difference. I'll then look into slicing those tcpdumps. During runtime in the fast path, the only

Re: tg3 driver timeout problems

2006-09-14 Thread Michael Chan
sunny12 wrote: Thanks a lot Michael, it seems to have resolved the issue, at least we were not able to reproduce it again after changing this flag. I will update this thread if the issue reoccurs. That's good to know. When you upgrade to the next 2.6.18 kernel, you can re-enable TSO

[PATCH 2/9][TG3]: Improve ASF heartbeat.

2006-09-27 Thread Michael Chan
will be unavailable. Using the new heartbeat code, the ASF firmware will also check the ring condition before resetting the chip when the heartbeat is expiring. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 4eef798..6af8ebc 100644

[PATCH 6/9][TG3]: Add basic 5906 support.

2006-09-27 Thread Michael Chan
[TG3]: Add basic 5906 support. Add support for the new 5709 device. This is a new 10/100 Mbps chip. The mailbox access and firmware interface are quite different from all other tg3 chips. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index

[PATCH 7/9][TG3]: Add 5709 PHY support.

2006-09-27 Thread Michael Chan
[TG3]: Add 5709 PHY support. Add support for the 5709 10/100 PHY. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 2b062d7..23f5744 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -1035,6 +1035,24 @@ out

[PATCH 9/9][TG3]: Update version and reldate.

2006-09-27 Thread Michael Chan
[TG3]: Update version and reldate. Update version to 3.66. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 21843de..c25ba27 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -68,8 +68,8 @@ #define DRV_MODULE_NAME

[PATCH 3/9][TG3]: PHY fixes.

2006-09-27 Thread Michael Chan
[TG3]: PHY fixes. Some PHY related fixes: 1. Fix Serdes WoL. 2. Fix loopback test on 10/100 only devices. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 6af8ebc..14e9645 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -1117,6

[PATCH 8/9][TG3]: Add 5709 self-test support.

2006-09-27 Thread Michael Chan
[TG3]: Add 5709 self-test support. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 23f5744..21843de 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -3615,8 +3615,7 @@ static irqreturn_t tg3_test_isr(int irq, if ((sblk

[PATCH 1/9][TG3]: Improve 5704S autoneg.

2006-09-27 Thread Michael Chan
[TG3]: Improve 5704S autoneg. Improve 5704S autoneg logic by using a serdes_counter field to keep track of the transient states. This eliminates a 200 msec busy loop in the code. Autoneg will take its course without the driver busy waiting for it to finish. Signed-off-by: Michael Chan [EMAIL

[PATCH 5/9][TG3]: Add tg3_poll_fw().

2006-09-27 Thread Michael Chan
[TG3]: Add tg3_poll_fw(). Put the firmware polling logic into a separate function. This makes the code cleaner. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index d443b73..eafca2a 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c

[PATCH 4/9][TG3]: Add 5722 and 5756 support.

2006-09-27 Thread Michael Chan
[TG3]: Add 5722 and 5756 support. Add IDs to support 5722 and 5756. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 14e9645..d443b73 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -173,6 +173,7 @@ static struct pci_device_id

Re: [PATCH 5/9][TG3]: Add tg3_poll_fw().

2006-09-27 Thread Michael Chan
On Wed, 2006-09-27 at 16:47 -0400, Jeff Garzik wrote: Michael Chan wrote: + /* Chip might not be fitted with firmware. Some Sun onboard +* parts are configured like that. So don't signal the timeout +* of the above loop as an error, but do report the lack of +* running

Re: [PATCH 2/9][TG3]: Improve ASF heartbeat.

2006-09-27 Thread Michael Chan
On Wed, 2006-09-27 at 16:01 -0700, David Miller wrote: But what exactly is meant by checking the ring condition? Does it mean that if the ASF heartbeat times out, ASF will check to see if the TX and/or RX ring are still making forward progress and abort the reset if so? Exactly. If the

Re: [PATCH 6/9][TG3]: Add basic 5906 support.

2006-09-27 Thread Michael Chan
On Wed, 2006-09-27 at 16:08 -0700, David Miller wrote: @@ -491,6 +513,9 @@ static inline void tg3_cond_int(struct t if (!(tp-tg3_flags TG3_FLAG_TAGGED_STATUS) (tp-hw_status-status SD_STATUS_UPDATED)) tw32(GRC_LOCAL_CTRL, tp-grc_local_ctrl | GRC_LCLCTRL_SETINT);

Re: [RFC] let mortals use ethtool

2006-09-28 Thread Michael Chan
On Thu, 2006-09-28 at 12:25 -0700, Stephen Hemminger wrote: + /* Allow some commands to be done by anyone */ + switch(ethcmd) { + case ETHTOOL_GSET: + case ETHTOOL_GDRVINFO: + case ETHTOOL_GREGS: + case ETHTOOL_GWOL: + case ETHTOOL_GMSGLVL: + case

Re: [RFC] let mortals use ethtool

2006-09-28 Thread Michael Chan
On Thu, 2006-09-28 at 16:35 -0400, Jeff Garzik wrote: James Morris wrote: On Thu, 28 Sep 2006, Michael Chan wrote: I'm against letting normal users do ETHTOOL_GREGS and ETHTOOL_PHYS_ID. Dumping 64K worth of registers and blinking the LEDs should be restricted. Out of curiosity

Re: [RFC] let mortals use ethtool

2006-09-28 Thread Michael Chan
On Thu, 2006-09-28 at 14:53 -0700, David Miller wrote: I've applied Stephen's patch with PHYS_ID removed from the allowed list, thanks for the feedback. Can you remove GREGS as well? Allowing users to dump all the registers will be very problematic. - To unsubscribe from this list: send the

[PATCH][BNX2]: Disable MSI on 5706 if AMD 8132 bridge is present

2006-09-29 Thread Michael Chan
version to 1.4.45. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 7fcf015..a65a697 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -56,8 +56,8 @@ #define DRV_MODULE_NAMEbnx2 #define PFX DRV_MODULE_NAME

Re: [PATCH][BNX2]: Disable MSI on 5706 if AMD 8132 bridge is present

2006-09-29 Thread Michael Chan
On Fri, 2006-09-29 at 17:28 -0400, Jeff Garzik wrote: Michael Chan wrote: AMD believes this incompatibility is unique to the 5706, and prefers to locally disable MSI rather than globally disabling it using pci_msi_quirk. Why is it unique to the 5706? Is this just a guess on AMD

Re: [PATCH][BNX2]: Disable MSI on 5706 if AMD 8132 bridge is present

2006-09-29 Thread Michael Chan
On Fri, 2006-09-29 at 19:15 -0400, Jeff Garzik wrote: It was completely vague as to why this incompatibility was specific to the 5706, when -- as the description noted -- the behavior is legal. The description is a bit vague in that one aspect that Jeff pointed out, but otherwise very

Re: [PATCH][BNX2]: Disable MSI on 5706 if AMD 8132 bridge is present

2006-09-30 Thread Michael Chan
On Sat, 2006-09-30 at 12:13 +0200, Brice Goglin wrote: What if the machine has such a bridge and board, but the board is not actually located somewhere behind the bridge? I would rather walk the PCI hierarchy from the board to the top and check whether we find a AMD8132. Probably something

Re: [patch] remove NETIF_F_TSO ifdefery

2006-12-12 Thread Michael Chan
Jeff Garzik write: Seems sane, though bnx2 and tg3 might want trivial modifications. I dunno if DaveM and mchan want to keep BCM_TSO and TG3_SUPPORT_TSO defines (you kept them, I prefer to kill them). I agree with Jeff. Those can be killed. - To unsubscribe from this list: send the

[PATCH 1/3][BNX2]: Fix panic in bnx2_tx_int().

2006-12-13 Thread Michael Chan
in the ring. Thanks to Corey Kovacs [EMAIL PROTECTED] and Andy Gospodarek [EMAIL PROTECTED] for reporting the problem and helping to collect debug information. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 7d824cf..f296c37 100644

[PATCH 2/3][BNX2]: Fix bug in bnx2_nvram_write().

2006-12-13 Thread Michael Chan
[BNX2]: Fix bug in bnx2_nvram_write(). Length was not calculated correctly if the NVRAM offset is on a non- aligned offset. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index f296c37..4fa7cef 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net

[PATCH 3/3][BNX2]: Fix minor loopback problem.

2006-12-13 Thread Michael Chan
[BNX2]: Fix minor loopback problem. Use the configured MAC address instead of the permanent MAC address for loopback frames. Update version to 1.5.2. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 4fa7cef..ada5e9b 100644 --- a/drivers

[PATCH 1/4][TG3]: Assign tp-link_config.orig_* values.

2006-12-15 Thread Michael Chan
() is called when the device is down. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 571320a..d01538e 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -7981,6 +7981,10 @@ static int tg3_set_settings(struct net_d tp

[PATCH 2/4][TG3]: Fix race condition when calling register_netdev().

2006-12-15 Thread Michael Chan
. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index d01538e..6804489 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -6988,6 +6988,8 @@ static int tg3_open(struct net_device *d struct tg3 *tp = netdev_priv(dev); int err

[PATCH 3/4][TG3]: Power down/up 5906 PHY correctly.

2006-12-15 Thread Michael Chan
[TG3]: Power down/up 5906 PHY correctly. The 5906 PHY requires a special register bit to power down and up the PHY. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 6804489..6ee399c 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c

[PATCH 4/4][TG3]: Update version and reldate.

2006-12-15 Thread Michael Chan
[TG3]: Update version and reldate. Update version to 3.71. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 6ee399c..cfdbca2 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -68,8 +68,8 @@ #define DRV_MODULE_NAME

Re: Fw: [Bugme-new] [Bug 7696] New: b44 driver doesn't work under heavy load

2006-12-18 Thread Michael Chan
the full_reset parameter to reset_kind parameter in b44_init_hw(). This will allow PHY reset to be skipped when ISTAT_ERRORS are encountered. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 474a4e3..b67963b 100644 --- a/drivers/net/b44.c +++ b/drivers/net

[BNX2 1/4]: Don't apply CRC PHY workaround to 5709.

2007-01-08 Thread Michael Chan
[BNX2]: Don't apply CRC PHY workaround to 5709. The workaround is only needed on 5706/5708 and cannot be applied on 5709. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index ada5e9b..8d682fc 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net

[BNX2 2/4]: Fix 5709 Serdes detection.

2007-01-08 Thread Michael Chan
[BNX2]: Fix 5709 Serdes detection. 5709 has a new register to detect copper/fiber PHYs. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 8d682fc..e325f93 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -5643,6 +5643,44

[BNX2 3/4]: Fix bug in bnx2_nvram_write().

2007-01-08 Thread Michael Chan
[BNX2]: Fix bug in bnx2_nvram_write(). The bug was a bogus pointer being passed to kfree(). The pointer was incremented in the write loop and then passed to kfree(). The fix is to use align_buf to save the original address. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers

[BNX2]: Fix 2nd port's MAC address.

2007-01-24 Thread Michael Chan
[BNX2]: Fix 2nd port's MAC address. On the 5709, we need to add the proper offset to calculate the shared memory base address of the 2nd port correctly. Otherwise, the 2nd port's MAC address and other information will be the same as the 1st port. Update version to 1.5.4. Signed-off-by: Michael

[BNX2]: PHY workaround for 5709 A0.

2007-02-01 Thread Michael Chan
[BNX2]: PHY workaround for 5709 A0. 5709 A0 copper devices will not link up with some link partners without this workaround. Update driver to 1.5.5. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 953808e..ee7b75b 100644 --- a/drivers

Re: e1000_down and tx_timeout worker race cleaning the transmit buffers

2006-04-20 Thread Michael Chan
On Fri, 2006-04-21 at 09:51 +1000, Herbert Xu wrote: Actually TG3 is buggy too. If the reset task is scheduled but isn't running yet there is no synchronisation here to prevent the reset task from running after tg3_close releases the tp lock. If we're in tg3_close() and the reset task

Re: e1000_down and tx_timeout worker race cleaning the transmit buffers

2006-04-20 Thread Michael Chan
On Fri, 2006-04-21 at 11:33 +1000, Herbert Xu wrote: Actually, what if the tg3_close is followed by a tg3_open? That could produce a spurious reset which I suppose isn't that bad. Yes, an extra reset. And yes, it isn't too bad. Also if the module is unloaded bad things will happen as well.

Re: e1000_down and tx_timeout worker race cleaning the transmit buffers

2006-04-20 Thread Michael Chan
On Fri, 2006-04-21 at 12:40 +1000, Herbert Xu wrote: One simple solution is to establish a separate queue for RTNL-holding users or vice versa for non-RTNL holding networking users. That would allow the drivers to safely flush the non-RTNL queue while holding the RTNL. You mean a separate

Re: e1000_down and tx_timeout worker race cleaning the transmit buffers

2006-04-20 Thread Michael Chan
On Thu, 2006-04-20 at 19:42 -0700, Shaw Vrana wrote: I'll bite! Here's a patch to add a call to flush_scheduled_work() in e1000_down. It's against 2.6.16.9. You're not following our discussion. It is not safe to call flush_scheduled_work() in a driver's close() because it is holding the

Re: e1000_down and tx_timeout worker race cleaning the transmit buffers

2006-04-21 Thread Michael Chan
On Fri, 2006-04-21 at 16:01 -0400, Andy Gospodarek wrote: I just hate to see extra resources used to solve problems that good coding can solve (not that my suggestion is necessarily a 'good' one), so I was trying to think of a way to resolve this without explicitly adding another workqueue.

Re: 2.6.16.11 BUG at tg3.c:2917

2006-04-27 Thread Michael Chan
On Thu, 2006-04-27 at 12:52 -0400, Ed L. Cashin wrote: -- [please bite here ] - Kernel BUG at drivers/net/tg3.c:2917 invalid opcode: [1] SMP CPU 0 Most likely caused by IO re-ordering. Try the test patch in this discussion:

[PATCH 1/6] tg3: Call netif_carrier_off() during phy reset

2006-04-28 Thread Michael Chan
Add netif_carrier_off() call during tg3_phy_reset(). This is needed to properly track the netif_carrier state in cases where we do a PHY reset with interrupts disabled. The SerDes code will not run properly if the netif_carrier state is wrong. Signed-off-by: Michael Chan [EMAIL PROTECTED] diff

  1   2   3   4   5   6   7   8   9   10   >