Re: [REGRESSION] tg3 dead after s2ram

2007-08-03 Thread David Miller
From: "Michael Chan" <[EMAIL PROTECTED]>
Date: Thu, 02 Aug 2007 12:10:29 -0700

> [TG3]: Fix suspend/resume problem.
> 
> Joachim Deguara <[EMAIL PROTECTED]> reported that tg3 devices
> would not resume properly if the device was shutdown before the system
> was suspended.  In such scenario where the netif_running state is 0,
> tg3_suspend() would not save the PCI state and so the memory enable bit
> and bus master enable bit would be lost.
> 
> We fix this by always saving and restoring the PCI state in
> tg3_suspend() and tg3_resume() regardless of netif_running() state.
> 
> Signed-off-by: Michael Chan <[EMAIL PROTECTED]>

Patch applied.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [REGRESSION] tg3 dead after s2ram

2007-08-03 Thread Joachim Deguara
On Thursday 02 August 2007 21:10:29 Michael Chan wrote:
> Alternatively, we can also fix it by calling pci_enable_device() again
> in tg3_open().  But I think it is better to just always save and restore
> in suspend/resume.  bnx2.c will also require the same fix.
>
> Thanks Joachim for helping to debug this problem.  Please try this
> patch:

Patch works for me.


-Joachim



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [REGRESSION] tg3 dead after s2ram

2007-08-02 Thread Michael Chan
On Thu, 2007-08-02 at 15:06 -0700, David Miller wrote:
> From: "Michael Chan" <[EMAIL PROTECTED]>
> Date: Thu, 02 Aug 2007 12:10:29 -0700
>
> > Alternatively, we can also fix it by calling pci_enable_device() again
> > in tg3_open().  But I think it is better to just always save and restore
> > in suspend/resume.  bnx2.c will also require the same fix.
> 
> We could do it that way.  But don't you think it's more reliable to
> save and restore around the event we know will be what clobbers the
> PCI config space on us? :-)
> 

Yes for sure when netif state is running and we were already doing that.

> Other things might happen between ->resume() and ->open() that could
> modify PCI config space, and we could overwrite such changes if we do
> the PCI restore in ->open().

I suggested calling pci_enable_device() in ->open(), not calling
pci_restore_state() in ->open().  I ultimately decided against it
because some devices do not enable memory as a workaround and it would
be messy to deal with it again in tg3_open().

I definitely agree that calling PCI restore in ->open() is a bad idea.
We used to save PCI state in ->probe() once and restore PCI state after
every chip reset.  This sequence caused many subtle problems.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [REGRESSION] tg3 dead after s2ram

2007-08-02 Thread David Miller
From: "Michael Chan" <[EMAIL PROTECTED]>
Date: Thu, 02 Aug 2007 12:10:29 -0700

> On Thu, 2007-08-02 at 02:23 -0700, David Miller wrote:
> > From: "Joachim Deguara" <[EMAIL PROTECTED]>
> > Date: Thu, 2 Aug 2007 11:15:05 +0200
> > 
> > > Seams like even if powersave shuts down the network that the device 
> > > should 
> > > still work after a suspend to ram, so who is at fault here?
> > 
> > It's a good question.
> > 
> > The pci_enable() is done on the PCI device at probe time, at least in
> > the tg3 driver, and with such a model restoring and saving of PCI
> > config space should not be dependant upon whether the netdev is
> > running or not.
> > 
> 
> Alternatively, we can also fix it by calling pci_enable_device() again
> in tg3_open().  But I think it is better to just always save and restore
> in suspend/resume.  bnx2.c will also require the same fix.

We could do it that way.  But don't you think it's more reliable to
save and restore around the event we know will be what clobbers the
PCI config space on us? :-)

Other things might happen between ->resume() and ->open() that could
modify PCI config space, and we could overwrite such changes if we do
the PCI restore in ->open().

One thing that's interesting to me is that, essentially, every PCI
driver with very few if any exceptions needs to do this sequence on
suspend and resume.  It would be nice if there was a way to get this
to happen transparently by default, with some reasonable override
mechanism, for PCI device drivers.

Anyways, once your patch is tested feel free to send me the bnx2
one too.

Thanks!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [REGRESSION] tg3 dead after s2ram

2007-08-02 Thread Michael Chan
On Thu, 2007-08-02 at 02:23 -0700, David Miller wrote:
> From: "Joachim Deguara" <[EMAIL PROTECTED]>
> Date: Thu, 2 Aug 2007 11:15:05 +0200
> 
> > Seams like even if powersave shuts down the network that the device should 
> > still work after a suspend to ram, so who is at fault here?
> 
> It's a good question.
> 
> The pci_enable() is done on the PCI device at probe time, at least in
> the tg3 driver, and with such a model restoring and saving of PCI
> config space should not be dependant upon whether the netdev is
> running or not.
> 

Alternatively, we can also fix it by calling pci_enable_device() again
in tg3_open().  But I think it is better to just always save and restore
in suspend/resume.  bnx2.c will also require the same fix.

Thanks Joachim for helping to debug this problem.  Please try this
patch:

[TG3]: Fix suspend/resume problem.

Joachim Deguara <[EMAIL PROTECTED]> reported that tg3 devices
would not resume properly if the device was shutdown before the system
was suspended.  In such scenario where the netif_running state is 0,
tg3_suspend() would not save the PCI state and so the memory enable bit
and bus master enable bit would be lost.

We fix this by always saving and restoring the PCI state in
tg3_suspend() and tg3_resume() regardless of netif_running() state.

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

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index dc41c05..5874042 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -64,8 +64,8 @@
 
 #define DRV_MODULE_NAME"tg3"
 #define PFX DRV_MODULE_NAME": "
-#define DRV_MODULE_VERSION "3.79"
-#define DRV_MODULE_RELDATE "July 18, 2007"
+#define DRV_MODULE_VERSION "3.80"
+#define DRV_MODULE_RELDATE "August 2, 2007"
 
 #define TG3_DEF_MAC_MODE   0
 #define TG3_DEF_RX_MODE0
@@ -12111,6 +12111,12 @@ static int tg3_suspend(struct pci_dev *pdev, 
pm_message_t state)
struct tg3 *tp = netdev_priv(dev);
int err;
 
+   /* PCI register 4 needs to be saved whether netif_running() or not.
+* MSI address and data need to be saved if using MSI and
+* netif_running().
+*/
+   pci_save_state(pdev);
+
if (!netif_running(dev))
return 0;
 
@@ -12130,9 +12136,6 @@ static int tg3_suspend(struct pci_dev *pdev, 
pm_message_t state)
tp->tg3_flags &= ~TG3_FLAG_INIT_COMPLETE;
tg3_full_unlock(tp);
 
-   /* Save MSI address and data for resume.  */
-   pci_save_state(pdev);
-
err = tg3_set_power_state(tp, pci_choose_state(pdev, state));
if (err) {
tg3_full_lock(tp, 0);
@@ -12160,11 +12163,11 @@ static int tg3_resume(struct pci_dev *pdev)
struct tg3 *tp = netdev_priv(dev);
int err;
 
+   pci_restore_state(tp->pdev);
+
if (!netif_running(dev))
return 0;
 
-   pci_restore_state(tp->pdev);
-
err = tg3_set_power_state(tp, PCI_D0);
if (err)
return err;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [REGRESSION] tg3 dead after s2ram

2007-08-02 Thread David Miller
From: "Joachim Deguara" <[EMAIL PROTECTED]>
Date: Thu, 2 Aug 2007 11:15:05 +0200

> Seams like even if powersave shuts down the network that the device should 
> still work after a suspend to ram, so who is at fault here?

It's a good question.

The pci_enable() is done on the PCI device at probe time, at least in
the tg3 driver, and with such a model restoring and saving of PCI
config space should not be dependant upon whether the netdev is
running or not.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [REGRESSION] tg3 dead after s2ram

2007-08-02 Thread Joachim Deguara
On Thursday 02 August 2007 10:05:44 Joachim Deguara wrote:
> On Wednesday 01 August 2007 23:00:23 Michael Chan wrote:
> > On Wed, 2007-08-01 at 10:47 -0700, Michael Chan wrote:
> > The problem is that memory enable and bus master were not set in PCI
> > register 4 after resume.  This also explains the register access
> > failures.

Found it! I did the instrumentation and found pci_restore was not being 
called. Why, because this code failed:

printk(KERN_INFO "tg3_resume: entered\n");
if (!netif_running(dev))
return 0;
printk(KERN_INFO "tg3_resume: before restore\n");

Bad dmesg:
[0.581236] PM: Writing back config space on device :07:00.0 at offset 
4
(was 4, writing d024)
[0.581259] tg3_resume: entered
[0.581276] PM: Writing back config space on device :08:09.0 at offset 
f
(was c001ff, writing 1c0010b)

why is this, oh damn it is because I was calling openSUSE's "powersave -u" and 
not s2ram directly.  powersave is disabling the network and the tg3 will not 
restore the pci device like this! right?

here is a good dmesg with by calling s2ram:
[0.577085] PM: Writing back config space on device :07:00.0 at offset 
4
(was 4, writing d024)
[0.577108] tg3_resume: entered
[0.577109] tg3_resume: before restore
[0.577140] PM: Writing back config space on device :08:04.0 at offset 
c
(was 0, writing )
[0.577171] PM: Writing back config space on device :08:04.0 at offset 
1
(was 2b0, writing 2b6)
[0.577304] tg3_resume: after set_power_state
[0.579119] tg3: eth0: Link is down.
[0.786266] ata2: SATA link down (SStatus 0 SControl 310)
[0.848176] tg3_resume: after tg3_restart_hw
[0.848265] PM: Writing back config space on device :08:09.0 at offset 
f
(was c001ff, writing 1c0010b)

Seams like even if powersave shuts down the network that the device should 
still work after a suspend to ram, so who is at fault here?

-Joachim


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [REGRESSION] tg3 dead after s2ram

2007-08-02 Thread Joachim Deguara
On Wednesday 01 August 2007 23:00:23 Michael Chan wrote:
> On Wed, 2007-08-01 at 10:47 -0700, Michael Chan wrote:
> > You have 2 Broadcom devices in your system.  07:00.0 is a wireless
> > device, I think.  8:4.0 is the tg3 device.
> >
> > It's clear that the tg3 device is still in D3 state after resume and
> > that explains why all register accesses fail.  tg3_resume() should put
> > the device back in D0 state in a very straight forward way and I don't
> > see how that can fail.  It worked for me when I tested it last night.
> > Can you add some printk() to tg3_resume() to see what's happening?  Let
> > me know if you want me to send you some debug patches to do that.
>
> I misread the PCI registers below.  The power state was ok.
>
> The problem is that memory enable and bus master were not set in PCI
> register 4 after resume.  This also explains the register access
> failures.
>
> In tg3_resume(), we call pci_restore_state() which should re-enable
> those 2 bits in PCI register 4.  Can you add some printk() to see why
> those bits are not restored after pci_restore_state()?

Reading pci_restore_state() it looks already instrumented.  Sorry about the 
wrong pci device, looking at my BCM5788 it is pci device 08:04.0 and looking 
at the log from my first post there is nothing restored in the first 64 
bytes!  Otherwise it would have said "PM: Writing back..."

Is this what you are looking for or should I do other printk instrumentation?

-Joachim

 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [REGRESSION] tg3 dead after s2ram

2007-08-01 Thread Michael Chan
On Wed, 2007-08-01 at 10:47 -0700, Michael Chan wrote:

> You have 2 Broadcom devices in your system.  07:00.0 is a wireless
> device, I think.  8:4.0 is the tg3 device.
> 
> It's clear that the tg3 device is still in D3 state after resume and
> that explains why all register accesses fail.  tg3_resume() should put
> the device back in D0 state in a very straight forward way and I don't
> see how that can fail.  It worked for me when I tested it last night.
> Can you add some printk() to tg3_resume() to see what's happening?  Let
> me know if you want me to send you some debug patches to do that.

I misread the PCI registers below.  The power state was ok.

The problem is that memory enable and bus master were not set in PCI
register 4 after resume.  This also explains the register access
failures.

In tg3_resume(), we call pci_restore_state() which should re-enable
those 2 bits in PCI register 4.  Can you add some printk() to see why
those bits are not restored after pci_restore_state()?

Thanks.

> 
> Here's the before and after for 8:4.0:
> 
> > 
> > Before
> >
> > 08:04.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5788 Gigabit 
> > Ethernet (rev 03)
> > Subsystem: Acer Incorporated [ALI] Unknown device 010e
> > Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
> > Stepping- 
> > SERR- FastB2B-
> > Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
> >  > SERR-  > Latency: 0 (16000ns min)
> > Interrupt: pin A routed to IRQ 22
> > Region 0: Memory at d030 (32-bit, non-prefetchable) [size=64K]
> > Expansion ROM at  [disabled]
> > Capabilities: [48] Power Management version 2
> > Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
> > PME(D0-,D1-,D2-,D3hot+,D3cold+)
> > Status: D0 PME-Enable- DSel=0 DScale=1 PME-
> > Capabilities: [50] Vital Product Data
> > Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+ Queue=0/3 
> > Enable-
> > Address: 6bfe7fb8  Data: fec7
> > 00: e4 14 9c 16 06 00 b0 02 03 00 00 02 00 00 00 00
> > 10: 00 00 30 d0 00 00 00 00 00 00 00 00 00 00 00 00
> > 20: 00 00 00 00 00 00 00 00 07 00 00 00 25 10 0e 01
> > 30: 00 00 ff ff 48 00 00 00 00 00 00 00 0a 01 40 00
> > 40: 00 00 00 00 00 00 00 00 01 50 02 c0 00 20 00 00
> > 50: 03 58 fc 00 6f bf be 7f 05 00 86 00 b8 ff ff 7f
> > 60: fe 6b ff ff c7 fe 00 00 98 00 03 30 00 00 3f 76
> > 70: f6 10 00 00 20 00 00 80 14 04 00 00 00 00 00 00
> > 80: 85 6b d0 36 03 40 00 0c 34 00 13 04 82 90 09 04
> > 90: 09 97 00 01 00 00 00 00 00 00 00 00 eb 01 00 00
> > a0: 00 00 00 00 23 01 00 00 00 00 00 00 cb 00 00 00
> > b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > 
> > After
> > 
> > 08:04.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5788 Gigabit 
> > Ethernet (rev 03)
> > Subsystem: Acer Incorporated [ALI] Unknown device 010e
> > Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
> > Stepping- 
> > SERR- FastB2B-
> > Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
> >  > SERR-  > Interrupt: pin A routed to IRQ 22
> > Region 0: Memory at d030 (32-bit, non-prefetchable) [disabled] 
> > [size=64K]
> > Expansion ROM at  [disabled]
> > Capabilities: [48] Power Management version 2
> > Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
> > PME(D0-,D1-,D2-,D3hot+,D3cold+)
> > Status: D0 PME-Enable+ DSel=0 DScale=1 PME-
> > Capabilities: [50] Vital Product Data
> > Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+ Queue=0/3 
> > Enable-
> > Address: 6bfe7fb8  Data: fec7
> > 00: e4 14 9c 16 00 00 b0 02 03 00 00 02 00 00 00 00
> > 10: 00 00 30 d0 00 00 00 00 00 00 00 00 00 00 00 00
> > 20: 00 00 00 00 00 00 00 00 07 00 00 00 25 10 0e 01
> > 30: 00 00 ff ff 48 00 00 00 00 00 00 00 0a 01 40 00
> > 40: 00 00 00 00 00 00 00 00 01 50 02 c0 00 21 00 64
> > 50: 03 58 fc 00 6f bf be 7f 05 00 86 00 b8 ff ff 7f
> > 60: fe 6b ff ff c7 fe 00 00 9a 00 03 30 00 00 00 00
> > 70: 76 10 00 00 40 00 00 00 50 00 00 00 00 00 00 00
> > 80: 03 58 fc 00 00 00 00 00 00 00 00 00 fe 90 09 04
> > 90: 01 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> > 


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

Re: [REGRESSION] tg3 dead after s2ram

2007-08-01 Thread Michael Chan
On Wed, 2007-08-01 at 10:01 +0200, Joachim Deguara wrote:

> Here are the lspci outputs for the tg3

You have 2 Broadcom devices in your system.  07:00.0 is a wireless
device, I think.  8:4.0 is the tg3 device.

It's clear that the tg3 device is still in D3 state after resume and
that explains why all register accesses fail.  tg3_resume() should put
the device back in D0 state in a very straight forward way and I don't
see how that can fail.  It worked for me when I tested it last night.
Can you add some printk() to tg3_resume() to see what's happening?  Let
me know if you want me to send you some debug patches to do that.

Thanks.

Here's the before and after for 8:4.0:

> 
> Before
>
> 08:04.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5788 Gigabit 
> Ethernet (rev 03)
>   Subsystem: Acer Incorporated [ALI] Unknown device 010e
>   Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
> Stepping- 
> SERR- FastB2B-
>   Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
>  SERR-Latency: 0 (16000ns min)
>   Interrupt: pin A routed to IRQ 22
>   Region 0: Memory at d030 (32-bit, non-prefetchable) [size=64K]
>   Expansion ROM at  [disabled]
>   Capabilities: [48] Power Management version 2
>   Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
> PME(D0-,D1-,D2-,D3hot+,D3cold+)
>   Status: D0 PME-Enable- DSel=0 DScale=1 PME-
>   Capabilities: [50] Vital Product Data
>   Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+ Queue=0/3 
> Enable-
>   Address: 6bfe7fb8  Data: fec7
> 00: e4 14 9c 16 06 00 b0 02 03 00 00 02 00 00 00 00
> 10: 00 00 30 d0 00 00 00 00 00 00 00 00 00 00 00 00
> 20: 00 00 00 00 00 00 00 00 07 00 00 00 25 10 0e 01
> 30: 00 00 ff ff 48 00 00 00 00 00 00 00 0a 01 40 00
> 40: 00 00 00 00 00 00 00 00 01 50 02 c0 00 20 00 00
> 50: 03 58 fc 00 6f bf be 7f 05 00 86 00 b8 ff ff 7f
> 60: fe 6b ff ff c7 fe 00 00 98 00 03 30 00 00 3f 76
> 70: f6 10 00 00 20 00 00 80 14 04 00 00 00 00 00 00
> 80: 85 6b d0 36 03 40 00 0c 34 00 13 04 82 90 09 04
> 90: 09 97 00 01 00 00 00 00 00 00 00 00 eb 01 00 00
> a0: 00 00 00 00 23 01 00 00 00 00 00 00 cb 00 00 00
> b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 
> After
> 
> 08:04.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5788 Gigabit 
> Ethernet (rev 03)
>   Subsystem: Acer Incorporated [ALI] Unknown device 010e
>   Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- 
> Stepping- 
> SERR- FastB2B-
>   Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
>  SERR-Interrupt: pin A routed to IRQ 22
>   Region 0: Memory at d030 (32-bit, non-prefetchable) [disabled] 
> [size=64K]
>   Expansion ROM at  [disabled]
>   Capabilities: [48] Power Management version 2
>   Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
> PME(D0-,D1-,D2-,D3hot+,D3cold+)
>   Status: D0 PME-Enable+ DSel=0 DScale=1 PME-
>   Capabilities: [50] Vital Product Data
>   Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+ Queue=0/3 
> Enable-
>   Address: 6bfe7fb8  Data: fec7
> 00: e4 14 9c 16 00 00 b0 02 03 00 00 02 00 00 00 00
> 10: 00 00 30 d0 00 00 00 00 00 00 00 00 00 00 00 00
> 20: 00 00 00 00 00 00 00 00 07 00 00 00 25 10 0e 01
> 30: 00 00 ff ff 48 00 00 00 00 00 00 00 0a 01 40 00
> 40: 00 00 00 00 00 00 00 00 01 50 02 c0 00 21 00 64
> 50: 03 58 fc 00 6f bf be 7f 05 00 86 00 b8 ff ff 7f
> 60: fe 6b ff ff c7 fe 00 00 9a 00 03 30 00 00 00 00
> 70: 76 10 00 00 40 00 00 00 50 00 00 00 00 00 00 00
> 80: 03 58 fc 00 00 00 00 00 00 00 00 00 fe 90 09 04
> 90: 01 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [REGRESSION] tg3 dead after s2ram

2007-08-01 Thread Michael Chan
On Tue, 2007-07-31 at 17:45 -0700, Andrew Morton wrote:
> On Tue, 31 Jul 2007 11:28:32 +0200 "Joachim Deguara"
> <[EMAIL PROTECTED]> wrote:
> 
> > On my Acer Ferrari 1000 the tg3 ethernet no longer is available
> after a
> > suspend to ram with the latet 2.6.23-rc1-git9.

It seems to work for me on the same 2.6.23-rc1-git9 kernel with the same
tg3 hardware.  Can you narrow down the problem some more?  It seems that
in your case, the chip registers are returning 0x after resume.
Can you do lspci -xxxvvv on the tg3 adapter after resume?

Here's my log:

tg3.c:v3.79 (July 18, 2007)
ACPI: PCI Interrupt :01:00.0[A] -> GSI 16 (level, low) -> IRQ 16
eth0: Tigon3 [partno(BCM95755m) rev a002 PHY(5755)] (PCI Express) 
10/100/1000Ba1eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] 
TSOcap[1]
eth0: dma_rwctrl[7618] dma_mask[64-bit]
ACPI: PCI Interrupt :40:00.0[A] -> GSI 17 (level, low) -> IRQ 17
eth1: Tigon3 [partno(BCM95751) rev 4001 PHY(5750)] (PCI Express) 
10/100/1000Bas5eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1] 
TSOcap[1]
eth1: dma_rwctrl[7618] dma_mask[64-bit]
ACPI: PCI Interrupt :05:09.0[A] -> GSI 18 (level, low) -> IRQ 19
eth2: Tigon3 [partno(BCM95788A50) rev 3003 PHY(5705)] (PCI:33MHz:32-bit) 
10/1008eth2: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[0] TSOcap[1]
eth2: dma_rwctrl[763f] dma_mask[32-bit]
ADDRCONF(NETDEV_UP): eth0: link is not ready
ADDRCONF(NETDEV_UP): eth1: link is not ready
ADDRCONF(NETDEV_UP): eth2: link is not ready
tg3: eth2: Link is up at 1000 Mbps, full duplex.
tg3: eth2: Flow control is on for TX and on for RX.
ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready
Stopping tasks ... done.
Suspending console(s)
ACPI handle has no context!
pnp: Device 00:08 disabled.
ACPI handle has no context!
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU0: Intel P4/Xeon Extended MCE MSRs (12) available
ACPI: PCI Interrupt :00:1f.2[B] -> GSI 19 (level, low) -> IRQ 18
tg3: eth2: Link is down.
pnp: Device 00:08 activated.
Restarting tasks ... hda: status error: status=0x51 { DriveReady SeekComplete 
E}hda: status error: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
hda: no DRQ after issuing MULTWRITE_EXT
hda: status error: status=0x51 { DriveReady SeekComplete Error }
hda: status error: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
hda: no DRQ after issuing MULTWRITE_EXT
hda: status error: status=0x51 { DriveReady SeekComplete Error }
hda: status error: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
hda: no DRQ after issuing MULTWRITE_EXT
hda: status error: status=0x51 { DriveReady SeekComplete Error }
hda: status error: error=0x04 { DriveStatusError }
ide: failed opcode was: unknown
hda: no DRQ after issuing MULTWRITE_EXT
done.
ide0: reset: success
tg3: eth2: Link is up at 1000 Mbps, full duplex.
tg3: eth2: Flow control is on for TX and on for RX.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [REGRESSION] tg3 dead after s2ram

2007-07-31 Thread Andrew Morton
On Tue, 31 Jul 2007 11:28:32 +0200 "Joachim Deguara" <[EMAIL PROTECTED]> wrote:

> On my Acer Ferrari 1000 the tg3 ethernet no longer is available after a 
> suspend to ram with the latet 2.6.23-rc1-git9.

Thanks. cc's added, body retained..


>  The tg3 works fine with s2ram 
> in 2.6.22.1.  The tell tail signs that is dead is this message from the 
> kernel log:
> 
> [6.754133] tg3: eth0: No firmware running.
> [6.816140] tg3: tg3_load_tso_firmware fails for eth0 to set CPU PC, is 
>  should be 0001
> [7.285797] ACPI: EC: Handler for query 0x80 is not found!
> [8.016223] tg3: tg3_abort_hw timed out for eth0, TX_MODE_ENABLE will not 
> clear MAC_TX_MODE=
> 
> and trying to bring the link up resuls in:
> 
> # ifconfig eth0 up
> SIOCSIFFLAGS: No such device
> 
> Full kernel log follows.
> 
> -Joachim
> 
> [0.00] Linux version 2.6.23-rc1-git9 ([EMAIL PROTECTED]) (gcc version 
> 4.2.1 20070705 (prerelease) (SUSE Linux)) #13 SMP PREEMPT Tue Jul 31 11:15:02 
> CEST 2007
> [0.00] Command line: 
> root=/dev/disk/by-id/scsi-SATA_Hitachi_HTS5416_SB2404SJHNT7YE-part6 
> sysrq_always_enable resume=/dev/sda5 splash=silent showopts
> [0.00] BIOS-provided physical RAM map:
> [0.00]  BIOS-e820:  - 0009dc00 (usable)
> [0.00]  BIOS-e820: 0009dc00 - 000a (reserved)
> [0.00]  BIOS-e820: 000d - 0010 (reserved)
> [0.00]  BIOS-e820: 0010 - 7be8 (usable)
> [0.00]  BIOS-e820: 7be8 - 7be95000 (ACPI data)
> [0.00]  BIOS-e820: 7be95000 - 7bf0 (ACPI NVS)
> [0.00]  BIOS-e820: 7bf0 - 8000 (reserved)
> [0.00]  BIOS-e820: e000 - f000 (reserved)
> [0.00]  BIOS-e820: fec0 - fec1 (reserved)
> [0.00]  BIOS-e820: fee0 - fee01000 (reserved)
> [0.00]  BIOS-e820: fff8 - 0001 (reserved)
> [0.00] Entering add_active_range(0, 0, 157) 0 entries of 3200 used
> [0.00] Entering add_active_range(0, 256, 507520) 1 entries of 3200 
> used
> [0.00] end_pfn_map = 1048576
> [0.00] DMI present.
> [0.00] ACPI: RSDP 000F81A0, 0014 (r0 PTLTD )
> [0.00] ACPI: RSDT 7BE8D65C, 003C (r1 ACRSYS ACRPRDCT  604  LTP
> 
> 0)
> [0.00] ACPI: FACP 7BE94B9A, 0074 (r1 ATIBowfin604 ATI 
> F4240)
> [0.00] ACPI: DSDT 7BE8D698, 7502 (r1ATISB460  604 MSFT  
> 202)
> [0.00] ACPI: FACS 7BE95FC0, 0040
> [0.00] ACPI: SSDT 7BE94C0E, 01C4 (r1 PTLTD  POWERNOW  604  LTP
> 
> 1)
> [0.00] ACPI: APIC 7BE94DD2, 0054 (r1 PTLTD APIC604  LTP   
>  
> 0)
> [0.00] ACPI: MCFG 7BE94E26, 003C (r1 PTLTDMCFG604  LTP
> 
> 0)
> [0.00] ACPI: BOOT 7BE94E62, 0028 (r1 PTLTD  $SBFTBL$  604  LTP
> 
> 1)
> [0.00] ACPI: SLIC 7BE94E8A, 0176 (r1 ACRSYS ACRPRDCT  604 acer
> 
> 0)
> [0.00] Scanning NUMA topology in Northbridge 24
> [0.00] CPU has 2 num_cores
> [0.00] No NUMA configuration found
> [0.00] Faking a node at -7be8
> [0.00] Entering add_active_range(0, 0, 157) 0 entries of 3200 used
> [0.00] Entering add_active_range(0, 256, 507520) 1 entries of 3200 
> used
> [0.00] Bootmem setup node 0 -7be8
> [0.00] Zone PFN ranges:
> [0.00]   DMA 0 -> 4096
> [0.00]   DMA324096 ->  1048576
> [0.00]   Normal1048576 ->  1048576
> [0.00] Movable zone start PFN for each node
> [0.00] early_node_map[2] active PFN ranges
> [0.00] 0:0 ->  157
> [0.00] 0:  256 ->   507520
> [0.00] On node 0 totalpages: 507421
> [0.00]   DMA zone: 56 pages used for memmap
> [0.00]   DMA zone: 1957 pages reserved
> [0.00]   DMA zone: 1984 pages, LIFO batch:0
> [0.00]   DMA32 zone: 6882 pages used for memmap
> [0.00]   DMA32 zone: 496542 pages, LIFO batch:31
> [0.00]   Normal zone: 0 pages used for memmap
> [0.00]   Movable zone: 0 pages used for memmap
> [0.00] ATI board detected. Disabling timer routing over 8254.
> [0.00] ACPI: PM-Timer IO Port: 0x8008
> [0.00] ACPI: Local APIC address 0xfee0
> [0.00] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
> [0.00] Processor #0 (Bootup-CPU)
> [0.00] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
> [0.00] Processor #1
> [0.00] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
> [0.00] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
> [0.00] ACPI: IOAPIC (id[0x02] address[0xfec0] gsi_base[0])
> [0.0

[REGRESSION] tg3 dead after s2ram

2007-07-31 Thread Joachim Deguara
On my Acer Ferrari 1000 the tg3 ethernet no longer is available after a 
suspend to ram with the latet 2.6.23-rc1-git9.  The tg3 works fine with s2ram 
in 2.6.22.1.  The tell tail signs that is dead is this message from the 
kernel log:

[6.754133] tg3: eth0: No firmware running.
[6.816140] tg3: tg3_load_tso_firmware fails for eth0 to set CPU PC, is 
 should be 0001
[7.285797] ACPI: EC: Handler for query 0x80 is not found!
[8.016223] tg3: tg3_abort_hw timed out for eth0, TX_MODE_ENABLE will not 
clear MAC_TX_MODE=

and trying to bring the link up resuls in:

# ifconfig eth0 up
SIOCSIFFLAGS: No such device

Full kernel log follows.

-Joachim

[0.00] Linux version 2.6.23-rc1-git9 ([EMAIL PROTECTED]) (gcc version 
4.2.1 20070705 (prerelease) (SUSE Linux)) #13 SMP PREEMPT Tue Jul 31 11:15:02 
CEST 2007
[0.00] Command line: 
root=/dev/disk/by-id/scsi-SATA_Hitachi_HTS5416_SB2404SJHNT7YE-part6 
sysrq_always_enable resume=/dev/sda5 splash=silent showopts
[0.00] BIOS-provided physical RAM map:
[0.00]  BIOS-e820:  - 0009dc00 (usable)
[0.00]  BIOS-e820: 0009dc00 - 000a (reserved)
[0.00]  BIOS-e820: 000d - 0010 (reserved)
[0.00]  BIOS-e820: 0010 - 7be8 (usable)
[0.00]  BIOS-e820: 7be8 - 7be95000 (ACPI data)
[0.00]  BIOS-e820: 7be95000 - 7bf0 (ACPI NVS)
[0.00]  BIOS-e820: 7bf0 - 8000 (reserved)
[0.00]  BIOS-e820: e000 - f000 (reserved)
[0.00]  BIOS-e820: fec0 - fec1 (reserved)
[0.00]  BIOS-e820: fee0 - fee01000 (reserved)
[0.00]  BIOS-e820: fff8 - 0001 (reserved)
[0.00] Entering add_active_range(0, 0, 157) 0 entries of 3200 used
[0.00] Entering add_active_range(0, 256, 507520) 1 entries of 3200 
used
[0.00] end_pfn_map = 1048576
[0.00] DMI present.
[0.00] ACPI: RSDP 000F81A0, 0014 (r0 PTLTD )
[0.00] ACPI: RSDT 7BE8D65C, 003C (r1 ACRSYS ACRPRDCT  604  LTP  
  
0)
[0.00] ACPI: FACP 7BE94B9A, 0074 (r1 ATIBowfin604 ATI 
F4240)
[0.00] ACPI: DSDT 7BE8D698, 7502 (r1ATISB460  604 MSFT  
202)
[0.00] ACPI: FACS 7BE95FC0, 0040
[0.00] ACPI: SSDT 7BE94C0E, 01C4 (r1 PTLTD  POWERNOW  604  LTP  
  
1)
[0.00] ACPI: APIC 7BE94DD2, 0054 (r1 PTLTD   APIC604  LTP   
 
0)
[0.00] ACPI: MCFG 7BE94E26, 003C (r1 PTLTDMCFG604  LTP  
  
0)
[0.00] ACPI: BOOT 7BE94E62, 0028 (r1 PTLTD  $SBFTBL$  604  LTP  
  
1)
[0.00] ACPI: SLIC 7BE94E8A, 0176 (r1 ACRSYS ACRPRDCT  604 acer  
  
0)
[0.00] Scanning NUMA topology in Northbridge 24
[0.00] CPU has 2 num_cores
[0.00] No NUMA configuration found
[0.00] Faking a node at -7be8
[0.00] Entering add_active_range(0, 0, 157) 0 entries of 3200 used
[0.00] Entering add_active_range(0, 256, 507520) 1 entries of 3200 
used
[0.00] Bootmem setup node 0 -7be8
[0.00] Zone PFN ranges:
[0.00]   DMA 0 -> 4096
[0.00]   DMA324096 ->  1048576
[0.00]   Normal1048576 ->  1048576
[0.00] Movable zone start PFN for each node
[0.00] early_node_map[2] active PFN ranges
[0.00] 0:0 ->  157
[0.00] 0:  256 ->   507520
[0.00] On node 0 totalpages: 507421
[0.00]   DMA zone: 56 pages used for memmap
[0.00]   DMA zone: 1957 pages reserved
[0.00]   DMA zone: 1984 pages, LIFO batch:0
[0.00]   DMA32 zone: 6882 pages used for memmap
[0.00]   DMA32 zone: 496542 pages, LIFO batch:31
[0.00]   Normal zone: 0 pages used for memmap
[0.00]   Movable zone: 0 pages used for memmap
[0.00] ATI board detected. Disabling timer routing over 8254.
[0.00] ACPI: PM-Timer IO Port: 0x8008
[0.00] ACPI: Local APIC address 0xfee0
[0.00] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[0.00] Processor #0 (Bootup-CPU)
[0.00] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
[0.00] Processor #1
[0.00] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
[0.00] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[0.00] ACPI: IOAPIC (id[0x02] address[0xfec0] gsi_base[0])
[0.00] IOAPIC[0]: apic_id 2, address 0xfec0, GSI 0-23
[0.00] ACPI: IRQ9 used by override.
[0.00] Setting APIC routing to flat
[0.00] Using ACPI (MADT) for SMP configuration information
[0.00] swsusp: Registered nosave memory region: 0009d000 - 
0009e000
[0.00] swsusp: R