public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [atl1-devel] BUG? WOL from S3
       [not found]     ` <002b01c777ec$b4364070$9927a8c0@shanghai.attansic.com>
@ 2007-04-10 22:38       ` 'Luca Tettamanti'
  2007-04-11  9:51         ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: 'Luca Tettamanti' @ 2007-04-10 22:38 UTC (permalink / raw)
  To: huang xiong; +Cc: atl1-devel, 'Tony Glader', linux-pm

Il Fri, Apr 06, 2007 at 09:41:31AM +0800, huang xiong ha scritto: 
> > > I do the same test over Intel/Realtek PCIE gigabit Ethernet adapter.
> > >
> > > And found the .resume function is called before the system really go to
> > > sleep.
> > >
> > > And because some shared hardware circuit. Attansic's nic can't enable both
> > > normal tx/rx setting and WOL setting.
> > >
> > > So attansic's linux driver think the system wakeup when the .resume is
> > > called, and it clear all WOL setting and back to normal tx/rx setting.
> 
> > Hum, what you describe seems to be suspend-to-disk:
> > 
> > ->suspend(PMSG_FREEZE)
> > take snapshot
> > ->resume() for writing the image
> > write snapshot
> > ->suspend(PMSG_SUSPEND)
>
>      You are right. It's suspend-to-disk.
>      Could you explain calling sequence of .suspend and .resume when the
> system goes to sleep for me ? such as S3/S4/...
>      I confused what the driver should do when .resume is called.

It should restore the normal state of the device. The first suspend
(PMSG_FREEZED) puts the device into a quiescent state (e.g. DMA transfers
shall be stopped). The system is then resumed so that the image can be
written to the disk. The second and final suspend call (PMSG_SUSPEND) is
done before shutting down the system.

> But It seems the system didn't called second .suspend.

Ouch. This is very strange. I'm adding a few of CC.

Luca
-- 
Colui che sorride quando le cose vanno male ha pensato a qualcuno a cui
dare la colpa.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [atl1-devel] BUG? WOL from S3
  2007-04-10 22:38       ` [atl1-devel] BUG? WOL from S3 'Luca Tettamanti'
@ 2007-04-11  9:51         ` Rafael J. Wysocki
  2007-04-11 20:50           ` Luca Tettamanti
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2007-04-11  9:51 UTC (permalink / raw)
  To: 'Luca Tettamanti'
  Cc: huang xiong, atl1-devel, 'Tony Glader', linux-pm

On Wednesday, 11 April 2007 00:38, 'Luca Tettamanti' wrote:
> Il Fri, Apr 06, 2007 at 09:41:31AM +0800, huang xiong ha scritto: 
> > > > I do the same test over Intel/Realtek PCIE gigabit Ethernet adapter.
> > > >
> > > > And found the .resume function is called before the system really go to
> > > > sleep.
> > > >
> > > > And because some shared hardware circuit. Attansic's nic can't enable both
> > > > normal tx/rx setting and WOL setting.
> > > >
> > > > So attansic's linux driver think the system wakeup when the .resume is
> > > > called, and it clear all WOL setting and back to normal tx/rx setting.
> > 
> > > Hum, what you describe seems to be suspend-to-disk:
> > > 
> > > ->suspend(PMSG_FREEZE)
> > > take snapshot
> > > ->resume() for writing the image
> > > write snapshot
> > > ->suspend(PMSG_SUSPEND)
> >
> >      You are right. It's suspend-to-disk.
> >      Could you explain calling sequence of .suspend and .resume when the
> > system goes to sleep for me ? such as S3/S4/...
> >      I confused what the driver should do when .resume is called.
> 
> It should restore the normal state of the device. The first suspend
> (PMSG_FREEZED) puts the device into a quiescent state (e.g. DMA transfers
> shall be stopped). The system is then resumed so that the image can be
> written to the disk. The second and final suspend call (PMSG_SUSPEND) is
> done before shutting down the system.

Er, no.  The system is just shut down, without suspending devices.

> > But It seems the system didn't called second .suspend.
> 
> Ouch. This is very strange. I'm adding a few of CC.

Well, that's how it works now.  We have considered suspending devices before
powering off for a while, but only theoretically.  If there's any additional
reason to do it, I think we can.

Greetings,
Rafael

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [atl1-devel] BUG? WOL from S3
  2007-04-11  9:51         ` Rafael J. Wysocki
@ 2007-04-11 20:50           ` Luca Tettamanti
  2007-04-12  3:35             ` 答复: " huang xiong
  0 siblings, 1 reply; 5+ messages in thread
From: Luca Tettamanti @ 2007-04-11 20:50 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: huang xiong, atl1-devel, Tony Glader, linux-pm

On 4/11/07, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Wednesday, 11 April 2007 00:38, 'Luca Tettamanti' wrote:
> > Il Fri, Apr 06, 2007 at 09:41:31AM +0800, huang xiong ha scritto:
> > > > > I do the same test over Intel/Realtek PCIE gigabit Ethernet adapter.
> > > > >
> > > > > And found the .resume function is called before the system really go to
> > > > > sleep.
> > > > >
> > > > > And because some shared hardware circuit. Attansic's nic can't enable both
> > > > > normal tx/rx setting and WOL setting.
> > > > >
> > > > > So attansic's linux driver think the system wakeup when the .resume is
> > > > > called, and it clear all WOL setting and back to normal tx/rx setting.
> > >
> > > > Hum, what you describe seems to be suspend-to-disk:
> > > >
> > > > ->suspend(PMSG_FREEZE)
> > > > take snapshot
> > > > ->resume() for writing the image
> > > > write snapshot
> > > > ->suspend(PMSG_SUSPEND)
> > >
> > >      You are right. It's suspend-to-disk.
> > >      Could you explain calling sequence of .suspend and .resume when the
> > > system goes to sleep for me ? such as S3/S4/...
> > >      I confused what the driver should do when .resume is called.
> >
> > It should restore the normal state of the device. The first suspend
> > (PMSG_FREEZED) puts the device into a quiescent state (e.g. DMA transfers
> > shall be stopped). The system is then resumed so that the image can be
> > written to the disk. The second and final suspend call (PMSG_SUSPEND) is
> > done before shutting down the system.
>
> Er, no.  The system is just shut down, without suspending devices.
>
> > > But It seems the system didn't called second .suspend.
> >
> > Ouch. This is very strange. I'm adding a few of CC.
>
> Well, that's how it works now.  We have considered suspending devices before
> powering off for a while, but only theoretically.  If there's any additional
> reason to do it, I think we can.

There's a problem with atl1 driver: Huang Xiong says that the chip can
be either is normal rx/tx mode or in WOL mode. When .resume is called
the NIC goes back in normal mode and won't react to WOL packets.

Luca

^ permalink raw reply	[flat|nested] 5+ messages in thread

* 答复: [atl1-devel] BUG? WOL from S3
  2007-04-11 20:50           ` Luca Tettamanti
@ 2007-04-12  3:35             ` huang xiong
  2007-04-12 15:42               ` [atl1-devel] " Chris Snook
  0 siblings, 1 reply; 5+ messages in thread
From: huang xiong @ 2007-04-12  3:35 UTC (permalink / raw)
  To: 'Luca Tettamanti', 'Rafael J. Wysocki'
  Cc: atl1-devel, 'Tony Glader', linux-pm

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



-----邮件原件-----
发件人: Luca Tettamanti [mailto:kronos.it@gmail.com] 
发送时间: 星期四 2007年4月12日 4:51
收件人: Rafael J. Wysocki
抄送: huang xiong; Tony Glader; atl1-devel@lists.sourceforge.net; Pavel
Machek; linux-pm@lists.osdl.org
主题: Re: [atl1-devel] BUG? WOL from S3

On 4/11/07, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Wednesday, 11 April 2007 00:38, 'Luca Tettamanti' wrote:
> > Il Fri, Apr 06, 2007 at 09:41:31AM +0800, huang xiong ha scritto:
> > > > > I do the same test over Intel/Realtek PCIE gigabit Ethernet
adapter.
> > > > >
> > > > > And found the .resume function is called before the system really
go to
> > > > > sleep.
> > > > >
> > > > > And because some shared hardware circuit. Attansic's nic can't
enable both
> > > > > normal tx/rx setting and WOL setting.
> > > > >
> > > > > So attansic's linux driver think the system wakeup when the
.resume is
> > > > > called, and it clear all WOL setting and back to normal tx/rx
setting.
> > >
> > > > Hum, what you describe seems to be suspend-to-disk:
> > > >
> > > > ->suspend(PMSG_FREEZE)
> > > > take snapshot
> > > > ->resume() for writing the image
> > > > write snapshot
> > > > ->suspend(PMSG_SUSPEND)
> > >
> > >      You are right. It's suspend-to-disk.
> > >      Could you explain calling sequence of .suspend and .resume when
the
> > > system goes to sleep for me ? such as S3/S4/...
> > >      I confused what the driver should do when .resume is called.
> >
> > It should restore the normal state of the device. The first suspend
> > (PMSG_FREEZED) puts the device into a quiescent state (e.g. DMA
transfers
> > shall be stopped). The system is then resumed so that the image can be
> > written to the disk. The second and final suspend call (PMSG_SUSPEND) is
> > done before shutting down the system.
>
> Er, no.  The system is just shut down, without suspending devices.
>
> > > But It seems the system didn't called second .suspend.
> >
> > Ouch. This is very strange. I'm adding a few of CC.
>
> Well, that's how it works now.  We have considered suspending devices
before
> powering off for a while, but only theoretically.  If there's any
additional
> reason to do it, I think we can.

There's a problem with atl1 driver: Huang Xiong says that the chip can
be either is normal rx/tx mode or in WOL mode. When .resume is called
the NIC goes back in normal mode and won't react to WOL packets.

Luca


------------------------------
Yes, what Luca say is right.




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [atl1-devel] 答复: [atl1-devel] BUG? WOL from S3
  2007-04-12  3:35             ` 答复: " huang xiong
@ 2007-04-12 15:42               ` Chris Snook
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Snook @ 2007-04-12 15:42 UTC (permalink / raw)
  To: huang xiong
  Cc: 'Luca Tettamanti', atl1-devel, 'Tony Glader',
	linux-pm

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

huang xiong wrote:
> 
> -----邮件原件-----
> 发件人: Luca Tettamanti [mailto:kronos.it@gmail.com] 
> 发送时间: 星期四 2007年4月12日 4:51
> 收件人: Rafael J. Wysocki
> 抄送: huang xiong; Tony Glader; atl1-devel@lists.sourceforge.net; Pavel
> Machek; linux-pm@lists.osdl.org
> 主题: Re: [atl1-devel] BUG? WOL from S3
> 
> On 4/11/07, Rafael J. Wysocki <rjw@sisk.pl> wrote:
>> On Wednesday, 11 April 2007 00:38, 'Luca Tettamanti' wrote:
>>> Il Fri, Apr 06, 2007 at 09:41:31AM +0800, huang xiong ha scritto:
>>>>>> I do the same test over Intel/Realtek PCIE gigabit Ethernet
> adapter.
>>>>>> And found the .resume function is called before the system really
> go to
>>>>>> sleep.
>>>>>>
>>>>>> And because some shared hardware circuit. Attansic's nic can't
> enable both
>>>>>> normal tx/rx setting and WOL setting.
>>>>>>
>>>>>> So attansic's linux driver think the system wakeup when the
> .resume is
>>>>>> called, and it clear all WOL setting and back to normal tx/rx
> setting.
>>>>> Hum, what you describe seems to be suspend-to-disk:
>>>>>
>>>>> ->suspend(PMSG_FREEZE)
>>>>> take snapshot
>>>>> ->resume() for writing the image
>>>>> write snapshot
>>>>> ->suspend(PMSG_SUSPEND)
>>>>      You are right. It's suspend-to-disk.
>>>>      Could you explain calling sequence of .suspend and .resume when
> the
>>>> system goes to sleep for me ? such as S3/S4/...
>>>>      I confused what the driver should do when .resume is called.
>>> It should restore the normal state of the device. The first suspend
>>> (PMSG_FREEZED) puts the device into a quiescent state (e.g. DMA
> transfers
>>> shall be stopped). The system is then resumed so that the image can be
>>> written to the disk. The second and final suspend call (PMSG_SUSPEND) is
>>> done before shutting down the system.
>> Er, no.  The system is just shut down, without suspending devices.
>>
>>>> But It seems the system didn't called second .suspend.
>>> Ouch. This is very strange. I'm adding a few of CC.
>> Well, that's how it works now.  We have considered suspending devices
> before
>> powering off for a while, but only theoretically.  If there's any
> additional
>> reason to do it, I think we can.
> 
> There's a problem with atl1 driver: Huang Xiong says that the chip can
> be either is normal rx/tx mode or in WOL mode. When .resume is called
> the NIC goes back in normal mode and won't react to WOL packets.
> 
> Luca
> 
> 
> ------------------------------
> Yes, what Luca say is right.

This may be related to the PCI_D3hot settings.  I'm investigating.

-- Chris

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-04-12 15:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <65c8858e0704040223g6fd006e8o2a4e426b3dbad228@mail.gmail.com>
     [not found] ` <003301c7771f$d5795a60$9927a8c0@shanghai.attansic.com>
     [not found]   ` <68676e00704051555h63d02709ma59b431fac12dd91@mail.gmail.com>
     [not found]     ` <002b01c777ec$b4364070$9927a8c0@shanghai.attansic.com>
2007-04-10 22:38       ` [atl1-devel] BUG? WOL from S3 'Luca Tettamanti'
2007-04-11  9:51         ` Rafael J. Wysocki
2007-04-11 20:50           ` Luca Tettamanti
2007-04-12  3:35             ` 答复: " huang xiong
2007-04-12 15:42               ` [atl1-devel] " Chris Snook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox