All of lore.kernel.org
 help / color / mirror / Atom feed
* smsc911x suspend/resume
@ 2010-02-08  9:42 ` Mike Rapoport
  0 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2010-02-08  9:42 UTC (permalink / raw)
  To: Steve Glendinning; +Cc: netdev, LAKML

Hi all,
I'm trying to make suspend/resume work on OMAP3-based system and I'm
encountering issues with resume of SMSC 9220 chip.
After resume the interface is unusable unless I do 'ifconfig eth0 down'
and 'ifconfig eth0 up'.
I would expect that 'ping <some host>' would work right after resume
without need to bring the interface down and up, but probably I miss
something.
Any help would be appreciated.

-- 
Sincerely yours,
Mike.


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

* smsc911x suspend/resume
@ 2010-02-08  9:42 ` Mike Rapoport
  0 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2010-02-08  9:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,
I'm trying to make suspend/resume work on OMAP3-based system and I'm
encountering issues with resume of SMSC 9220 chip.
After resume the interface is unusable unless I do 'ifconfig eth0 down'
and 'ifconfig eth0 up'.
I would expect that 'ping <some host>' would work right after resume
without need to bring the interface down and up, but probably I miss
something.
Any help would be appreciated.

-- 
Sincerely yours,
Mike.

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

* Re: smsc911x suspend/resume
  2010-02-08  9:42 ` Mike Rapoport
@ 2010-02-08 10:11   ` Daniel Mack
  -1 siblings, 0 replies; 27+ messages in thread
From: Daniel Mack @ 2010-02-08 10:11 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: Steve Glendinning, netdev, LAKML

On Mon, Feb 08, 2010 at 11:42:27AM +0200, Mike Rapoport wrote:
> I'm trying to make suspend/resume work on OMAP3-based system and I'm
> encountering issues with resume of SMSC 9220 chip.
> After resume the interface is unusable unless I do 'ifconfig eth0 down'
> and 'ifconfig eth0 up'.
> I would expect that 'ping <some host>' would work right after resume
> without need to bring the interface down and up, but probably I miss
> something.
> Any help would be appreciated.

What happens to your supply voltages when going to suspend? When I
implemented the code for the smsc driver, I could only test scenarios
where AVDD remains stable during suspend. So the driver might need some
tweaks if that assumption is not true in your case. The SMSC datasheet
is quite comprehensive about this topic IIRC.

Also have a look at the Raumfeld device patches which use exactly this
chip and which can suspend and resume just fine. You'll need to check
out Eric's devel branch for that.

Daniel


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

* smsc911x suspend/resume
@ 2010-02-08 10:11   ` Daniel Mack
  0 siblings, 0 replies; 27+ messages in thread
From: Daniel Mack @ 2010-02-08 10:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 08, 2010 at 11:42:27AM +0200, Mike Rapoport wrote:
> I'm trying to make suspend/resume work on OMAP3-based system and I'm
> encountering issues with resume of SMSC 9220 chip.
> After resume the interface is unusable unless I do 'ifconfig eth0 down'
> and 'ifconfig eth0 up'.
> I would expect that 'ping <some host>' would work right after resume
> without need to bring the interface down and up, but probably I miss
> something.
> Any help would be appreciated.

What happens to your supply voltages when going to suspend? When I
implemented the code for the smsc driver, I could only test scenarios
where AVDD remains stable during suspend. So the driver might need some
tweaks if that assumption is not true in your case. The SMSC datasheet
is quite comprehensive about this topic IIRC.

Also have a look at the Raumfeld device patches which use exactly this
chip and which can suspend and resume just fine. You'll need to check
out Eric's devel branch for that.

Daniel

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

* Re: smsc911x suspend/resume
  2010-02-08 10:11   ` Daniel Mack
@ 2010-02-08 11:30     ` Mike Rapoport
  -1 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2010-02-08 11:30 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Steve Glendinning, netdev, LAKML

Daniel Mack wrote:
> On Mon, Feb 08, 2010 at 11:42:27AM +0200, Mike Rapoport wrote:
>> I'm trying to make suspend/resume work on OMAP3-based system and I'm
>> encountering issues with resume of SMSC 9220 chip.
>> After resume the interface is unusable unless I do 'ifconfig eth0 down'
>> and 'ifconfig eth0 up'.
>> I would expect that 'ping <some host>' would work right after resume
>> without need to bring the interface down and up, but probably I miss
>> something.
>> Any help would be appreciated.
> 
> What happens to your supply voltages when going to suspend? When I
> implemented the code for the smsc driver, I could only test scenarios
> where AVDD remains stable during suspend. So the driver might need some
> tweaks if that assumption is not true in your case. The SMSC datasheet
> is quite comprehensive about this topic IIRC.

By AVDD you mean VDD33A?
Anyway, I have all the supplies except VDDVARIO shut down...
And the datasheet is indeed comprehensively describes chip power states
but I haven't found there anything about supplies required to stay on
during suspend...


> Also have a look at the Raumfeld device patches which use exactly this
> chip and which can suspend and resume just fine. You'll need to check
> out Eric's devel branch for that.
> 
> Daniel
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Sincerely yours,
Mike.

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

* smsc911x suspend/resume
@ 2010-02-08 11:30     ` Mike Rapoport
  0 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2010-02-08 11:30 UTC (permalink / raw)
  To: linux-arm-kernel

Daniel Mack wrote:
> On Mon, Feb 08, 2010 at 11:42:27AM +0200, Mike Rapoport wrote:
>> I'm trying to make suspend/resume work on OMAP3-based system and I'm
>> encountering issues with resume of SMSC 9220 chip.
>> After resume the interface is unusable unless I do 'ifconfig eth0 down'
>> and 'ifconfig eth0 up'.
>> I would expect that 'ping <some host>' would work right after resume
>> without need to bring the interface down and up, but probably I miss
>> something.
>> Any help would be appreciated.
> 
> What happens to your supply voltages when going to suspend? When I
> implemented the code for the smsc driver, I could only test scenarios
> where AVDD remains stable during suspend. So the driver might need some
> tweaks if that assumption is not true in your case. The SMSC datasheet
> is quite comprehensive about this topic IIRC.

By AVDD you mean VDD33A?
Anyway, I have all the supplies except VDDVARIO shut down...
And the datasheet is indeed comprehensively describes chip power states
but I haven't found there anything about supplies required to stay on
during suspend...


> Also have a look at the Raumfeld device patches which use exactly this
> chip and which can suspend and resume just fine. You'll need to check
> out Eric's devel branch for that.
> 
> Daniel
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Sincerely yours,
Mike.

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

* Re: smsc911x suspend/resume
  2010-02-08 11:30     ` Mike Rapoport
@ 2010-02-08 11:46       ` Daniel Mack
  -1 siblings, 0 replies; 27+ messages in thread
From: Daniel Mack @ 2010-02-08 11:46 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: Steve Glendinning, netdev, LAKML

On Mon, Feb 08, 2010 at 01:30:42PM +0200, Mike Rapoport wrote:
> Daniel Mack wrote:
> > What happens to your supply voltages when going to suspend? When I
> > implemented the code for the smsc driver, I could only test scenarios
> > where AVDD remains stable during suspend. So the driver might need some
> > tweaks if that assumption is not true in your case. The SMSC datasheet
> > is quite comprehensive about this topic IIRC.
> 
> By AVDD you mean VDD33A?

Yes.

> Anyway, I have all the supplies except VDDVARIO shut down...
> And the datasheet is indeed comprehensively describes chip power states
> but I haven't found there anything about supplies required to stay on
> during suspend...

In fact the datasheet doesn't really state that, and the chip seems
to expect the power domains to remain switched on during suspend, and
all power switching is done internally. Also the table in "7.4 Power
Consumption (Device and System Components)" describes it like that.

So it all comes down to the question of how low-power you need to be,
and whether you need wake-on-lan or not. What's currently implemented is
D1, but adding support for D2 should be easy.

Daniel

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

* smsc911x suspend/resume
@ 2010-02-08 11:46       ` Daniel Mack
  0 siblings, 0 replies; 27+ messages in thread
From: Daniel Mack @ 2010-02-08 11:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 08, 2010 at 01:30:42PM +0200, Mike Rapoport wrote:
> Daniel Mack wrote:
> > What happens to your supply voltages when going to suspend? When I
> > implemented the code for the smsc driver, I could only test scenarios
> > where AVDD remains stable during suspend. So the driver might need some
> > tweaks if that assumption is not true in your case. The SMSC datasheet
> > is quite comprehensive about this topic IIRC.
> 
> By AVDD you mean VDD33A?

Yes.

> Anyway, I have all the supplies except VDDVARIO shut down...
> And the datasheet is indeed comprehensively describes chip power states
> but I haven't found there anything about supplies required to stay on
> during suspend...

In fact the datasheet doesn't really state that, and the chip seems
to expect the power domains to remain switched on during suspend, and
all power switching is done internally. Also the table in "7.4 Power
Consumption (Device and System Components)" describes it like that.

So it all comes down to the question of how low-power you need to be,
and whether you need wake-on-lan or not. What's currently implemented is
D1, but adding support for D2 should be easy.

Daniel

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

* Re: smsc911x suspend/resume
  2010-02-08 11:30     ` Mike Rapoport
@ 2010-02-08 11:46       ` Steve.Glendinning at smsc.com
  -1 siblings, 0 replies; 27+ messages in thread
From: Steve.Glendinning @ 2010-02-08 11:46 UTC (permalink / raw)
  To: Mike Rapoport
  Cc: Daniel Mack, LAKML, netdev, Ian.Saturley, Vlad.Lyalikov, davem

Hi Mike,

> >> I'm trying to make suspend/resume work on OMAP3-based system and I'm
> >> encountering issues with resume of SMSC 9220 chip.
> >> After resume the interface is unusable unless I do 'ifconfig eth0 
down'
> >> and 'ifconfig eth0 up'.
> >> I would expect that 'ping <some host>' would work right after resume
> >> without need to bring the interface down and up, but probably I miss
> >> something.
> >> Any help would be appreciated.
> > 
> > What happens to your supply voltages when going to suspend? When I
> > implemented the code for the smsc driver, I could only test scenarios
> > where AVDD remains stable during suspend. So the driver might need 
some
> > tweaks if that assumption is not true in your case. The SMSC datasheet
> > is quite comprehensive about this topic IIRC.
> 
> By AVDD you mean VDD33A?
> Anyway, I have all the supplies except VDDVARIO shut down...
> And the datasheet is indeed comprehensively describes chip power states
> but I haven't found there anything about supplies required to stay on
> during suspend...

I don't have the code in front of me (I'm travelling today) but IIRC
the driver doesn't place the LAN9220 in a specific power saving state,
so as far as the LAN9220 is concerned it's not actually suspended.

It's hard to do this in a "generic" way: some people expect their link
to stay up during suspend, some want suspend to completely power down
the ethernet chip, and some want to use one of several WoL modes. 

David: What's the "done thing" here for similar non-pci drivers?
Obviously "doesn't work after suspend" isn't the intended behaviour, so
there's definitely room for improvement!

> > Also have a look at the Raumfeld device patches which use exactly this
> > chip and which can suspend and resume just fine. You'll need to check
> > out Eric's devel branch for that.

Daniel: I haven't seen this, do you have a location for the git tree?

Thanks,
Steve

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

* smsc911x suspend/resume
@ 2010-02-08 11:46       ` Steve.Glendinning at smsc.com
  0 siblings, 0 replies; 27+ messages in thread
From: Steve.Glendinning at smsc.com @ 2010-02-08 11:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mike,

> >> I'm trying to make suspend/resume work on OMAP3-based system and I'm
> >> encountering issues with resume of SMSC 9220 chip.
> >> After resume the interface is unusable unless I do 'ifconfig eth0 
down'
> >> and 'ifconfig eth0 up'.
> >> I would expect that 'ping <some host>' would work right after resume
> >> without need to bring the interface down and up, but probably I miss
> >> something.
> >> Any help would be appreciated.
> > 
> > What happens to your supply voltages when going to suspend? When I
> > implemented the code for the smsc driver, I could only test scenarios
> > where AVDD remains stable during suspend. So the driver might need 
some
> > tweaks if that assumption is not true in your case. The SMSC datasheet
> > is quite comprehensive about this topic IIRC.
> 
> By AVDD you mean VDD33A?
> Anyway, I have all the supplies except VDDVARIO shut down...
> And the datasheet is indeed comprehensively describes chip power states
> but I haven't found there anything about supplies required to stay on
> during suspend...

I don't have the code in front of me (I'm travelling today) but IIRC
the driver doesn't place the LAN9220 in a specific power saving state,
so as far as the LAN9220 is concerned it's not actually suspended.

It's hard to do this in a "generic" way: some people expect their link
to stay up during suspend, some want suspend to completely power down
the ethernet chip, and some want to use one of several WoL modes. 

David: What's the "done thing" here for similar non-pci drivers?
Obviously "doesn't work after suspend" isn't the intended behaviour, so
there's definitely room for improvement!

> > Also have a look at the Raumfeld device patches which use exactly this
> > chip and which can suspend and resume just fine. You'll need to check
> > out Eric's devel branch for that.

Daniel: I haven't seen this, do you have a location for the git tree?

Thanks,
Steve

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

* Re: smsc911x suspend/resume
  2010-02-08 11:46       ` Steve.Glendinning at smsc.com
@ 2010-02-08 11:53         ` Daniel Mack
  -1 siblings, 0 replies; 27+ messages in thread
From: Daniel Mack @ 2010-02-08 11:53 UTC (permalink / raw)
  To: Steve.Glendinning
  Cc: Mike Rapoport, LAKML, netdev, Ian.Saturley, Vlad.Lyalikov, davem

On Mon, Feb 08, 2010 at 11:46:39AM +0000, Steve.Glendinning@smsc.com wrote:
> > Anyway, I have all the supplies except VDDVARIO shut down...
> > And the datasheet is indeed comprehensively describes chip power states
> > but I haven't found there anything about supplies required to stay on
> > during suspend...
> 
> I don't have the code in front of me (I'm travelling today) but IIRC
> the driver doesn't place the LAN9220 in a specific power saving state,
> so as far as the LAN9220 is concerned it's not actually suspended.

It does, I added that awhile back in b6907b0c7. But as I say, this is
currently hard-coded to D1, and if support for D2 is desired, we would
need to make that a platform data option.

> It's hard to do this in a "generic" way: some people expect their link
> to stay up during suspend, some want suspend to completely power down
> the ethernet chip, and some want to use one of several WoL modes. 
> 
> David: What's the "done thing" here for similar non-pci drivers?
> Obviously "doesn't work after suspend" isn't the intended behaviour, so
> there's definitely room for improvement!
> 
> > > Also have a look at the Raumfeld device patches which use exactly this
> > > chip and which can suspend and resume just fine. You'll need to check
> > > out Eric's devel branch for that.
> 
> Daniel: I haven't seen this, do you have a location for the git tree?

git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6.git

See the 'devel' branch. But there's actually nothing exciting in there,
it's just a simple platform support.

Daniel

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

* smsc911x suspend/resume
@ 2010-02-08 11:53         ` Daniel Mack
  0 siblings, 0 replies; 27+ messages in thread
From: Daniel Mack @ 2010-02-08 11:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 08, 2010 at 11:46:39AM +0000, Steve.Glendinning at smsc.com wrote:
> > Anyway, I have all the supplies except VDDVARIO shut down...
> > And the datasheet is indeed comprehensively describes chip power states
> > but I haven't found there anything about supplies required to stay on
> > during suspend...
> 
> I don't have the code in front of me (I'm travelling today) but IIRC
> the driver doesn't place the LAN9220 in a specific power saving state,
> so as far as the LAN9220 is concerned it's not actually suspended.

It does, I added that awhile back in b6907b0c7. But as I say, this is
currently hard-coded to D1, and if support for D2 is desired, we would
need to make that a platform data option.

> It's hard to do this in a "generic" way: some people expect their link
> to stay up during suspend, some want suspend to completely power down
> the ethernet chip, and some want to use one of several WoL modes. 
> 
> David: What's the "done thing" here for similar non-pci drivers?
> Obviously "doesn't work after suspend" isn't the intended behaviour, so
> there's definitely room for improvement!
> 
> > > Also have a look at the Raumfeld device patches which use exactly this
> > > chip and which can suspend and resume just fine. You'll need to check
> > > out Eric's devel branch for that.
> 
> Daniel: I haven't seen this, do you have a location for the git tree?

git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6.git

See the 'devel' branch. But there's actually nothing exciting in there,
it's just a simple platform support.

Daniel

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

* Re: smsc911x suspend/resume
  2010-02-08 11:53         ` Daniel Mack
@ 2010-02-08 12:27           ` Steve.Glendinning at smsc.com
  -1 siblings, 0 replies; 27+ messages in thread
From: Steve.Glendinning @ 2010-02-08 12:27 UTC (permalink / raw)
  To: Daniel Mack
  Cc: davem, Ian.Saturley, LAKML, Mike Rapoport, netdev, netdev-owner,
	Vlad.Lyalikov

> > I don't have the code in front of me (I'm travelling today) but IIRC
> > the driver doesn't place the LAN9220 in a specific power saving state,
> > so as far as the LAN9220 is concerned it's not actually suspended.
> 
> It does, I added that awhile back in b6907b0c7. But as I say, this is
> currently hard-coded to D1, and if support for D2 is desired, we would
> need to make that a platform data option.

You're right, and I should remember as I reviewed it!

Steve

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

* smsc911x suspend/resume
@ 2010-02-08 12:27           ` Steve.Glendinning at smsc.com
  0 siblings, 0 replies; 27+ messages in thread
From: Steve.Glendinning at smsc.com @ 2010-02-08 12:27 UTC (permalink / raw)
  To: linux-arm-kernel

> > I don't have the code in front of me (I'm travelling today) but IIRC
> > the driver doesn't place the LAN9220 in a specific power saving state,
> > so as far as the LAN9220 is concerned it's not actually suspended.
> 
> It does, I added that awhile back in b6907b0c7. But as I say, this is
> currently hard-coded to D1, and if support for D2 is desired, we would
> need to make that a platform data option.

You're right, and I should remember as I reviewed it!

Steve

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

* Re: smsc911x suspend/resume
  2010-02-08 11:46       ` Steve.Glendinning at smsc.com
@ 2010-02-08 13:55         ` Mike Rapoport
  -1 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2010-02-08 13:55 UTC (permalink / raw)
  To: Steve.Glendinning
  Cc: Daniel Mack, LAKML, netdev, Ian.Saturley, Vlad.Lyalikov, davem

Steve.Glendinning@smsc.com wrote:
> Hi Mike,
> 
>>>> I'm trying to make suspend/resume work on OMAP3-based system and I'm
>>>> encountering issues with resume of SMSC 9220 chip.
>>>> After resume the interface is unusable unless I do 'ifconfig eth0 
> down'
>>>> and 'ifconfig eth0 up'.
>>>> I would expect that 'ping <some host>' would work right after resume
>>>> without need to bring the interface down and up, but probably I miss
>>>> something.
>>>> Any help would be appreciated.
>>> What happens to your supply voltages when going to suspend? When I
>>> implemented the code for the smsc driver, I could only test scenarios
>>> where AVDD remains stable during suspend. So the driver might need 
> some
>>> tweaks if that assumption is not true in your case. The SMSC datasheet
>>> is quite comprehensive about this topic IIRC.
>> By AVDD you mean VDD33A?
>> Anyway, I have all the supplies except VDDVARIO shut down...
>> And the datasheet is indeed comprehensively describes chip power states
>> but I haven't found there anything about supplies required to stay on
>> during suspend...
> 
> I don't have the code in front of me (I'm travelling today) but IIRC
> the driver doesn't place the LAN9220 in a specific power saving state,
> so as far as the LAN9220 is concerned it's not actually suspended.
> 
> It's hard to do this in a "generic" way: some people expect their link
> to stay up during suspend, some want suspend to completely power down
> the ethernet chip, and some want to use one of several WoL modes. 

Indeed a "generic" implementation may be tough task... Probably we can
add some platform_data flags for suspend modes and use them to decide
what low power mode should be selected?

> David: What's the "done thing" here for similar non-pci drivers?
> Obviously "doesn't work after suspend" isn't the intended behaviour, so
> there's definitely room for improvement!
> 
>>> Also have a look at the Raumfeld device patches which use exactly this
>>> chip and which can suspend and resume just fine. You'll need to check
>>> out Eric's devel branch for that.
> 
> Daniel: I haven't seen this, do you have a location for the git tree?
> 
> Thanks,
> Steve


-- 
Sincerely yours,
Mike.

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

* smsc911x suspend/resume
@ 2010-02-08 13:55         ` Mike Rapoport
  0 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2010-02-08 13:55 UTC (permalink / raw)
  To: linux-arm-kernel

Steve.Glendinning at smsc.com wrote:
> Hi Mike,
> 
>>>> I'm trying to make suspend/resume work on OMAP3-based system and I'm
>>>> encountering issues with resume of SMSC 9220 chip.
>>>> After resume the interface is unusable unless I do 'ifconfig eth0 
> down'
>>>> and 'ifconfig eth0 up'.
>>>> I would expect that 'ping <some host>' would work right after resume
>>>> without need to bring the interface down and up, but probably I miss
>>>> something.
>>>> Any help would be appreciated.
>>> What happens to your supply voltages when going to suspend? When I
>>> implemented the code for the smsc driver, I could only test scenarios
>>> where AVDD remains stable during suspend. So the driver might need 
> some
>>> tweaks if that assumption is not true in your case. The SMSC datasheet
>>> is quite comprehensive about this topic IIRC.
>> By AVDD you mean VDD33A?
>> Anyway, I have all the supplies except VDDVARIO shut down...
>> And the datasheet is indeed comprehensively describes chip power states
>> but I haven't found there anything about supplies required to stay on
>> during suspend...
> 
> I don't have the code in front of me (I'm travelling today) but IIRC
> the driver doesn't place the LAN9220 in a specific power saving state,
> so as far as the LAN9220 is concerned it's not actually suspended.
> 
> It's hard to do this in a "generic" way: some people expect their link
> to stay up during suspend, some want suspend to completely power down
> the ethernet chip, and some want to use one of several WoL modes. 

Indeed a "generic" implementation may be tough task... Probably we can
add some platform_data flags for suspend modes and use them to decide
what low power mode should be selected?

> David: What's the "done thing" here for similar non-pci drivers?
> Obviously "doesn't work after suspend" isn't the intended behaviour, so
> there's definitely room for improvement!
> 
>>> Also have a look at the Raumfeld device patches which use exactly this
>>> chip and which can suspend and resume just fine. You'll need to check
>>> out Eric's devel branch for that.
> 
> Daniel: I haven't seen this, do you have a location for the git tree?
> 
> Thanks,
> Steve


-- 
Sincerely yours,
Mike.

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

* Re: smsc911x suspend/resume
  2010-02-08 11:46       ` Daniel Mack
@ 2010-02-08 14:42         ` Mike Rapoport
  -1 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2010-02-08 14:42 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Steve Glendinning, netdev, LAKML

Daniel Mack wrote:
> On Mon, Feb 08, 2010 at 01:30:42PM +0200, Mike Rapoport wrote:
>> Daniel Mack wrote:
>>> What happens to your supply voltages when going to suspend? When I
>>> implemented the code for the smsc driver, I could only test scenarios
>>> where AVDD remains stable during suspend. So the driver might need some
>>> tweaks if that assumption is not true in your case. The SMSC datasheet
>>> is quite comprehensive about this topic IIRC.
>> By AVDD you mean VDD33A?
> 
> Yes.
> 
>> Anyway, I have all the supplies except VDDVARIO shut down...
>> And the datasheet is indeed comprehensively describes chip power states
>> but I haven't found there anything about supplies required to stay on
>> during suspend...
> 
> In fact the datasheet doesn't really state that, and the chip seems
> to expect the power domains to remain switched on during suspend, and
> all power switching is done internally. Also the table in "7.4 Power
> Consumption (Device and System Components)" describes it like that.
> 
> So it all comes down to the question of how low-power you need to be,
> and whether you need wake-on-lan or not. What's currently implemented is
> D1, but adding support for D2 should be easy.

I did some brute force save/restore of smsc9220 registers and it seems
to wake up now.
The question now is how to make it in a "generic" way ...
Thanks for the help anyway :)

> Daniel


-- 
Sincerely yours,
Mike.

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

* smsc911x suspend/resume
@ 2010-02-08 14:42         ` Mike Rapoport
  0 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2010-02-08 14:42 UTC (permalink / raw)
  To: linux-arm-kernel

Daniel Mack wrote:
> On Mon, Feb 08, 2010 at 01:30:42PM +0200, Mike Rapoport wrote:
>> Daniel Mack wrote:
>>> What happens to your supply voltages when going to suspend? When I
>>> implemented the code for the smsc driver, I could only test scenarios
>>> where AVDD remains stable during suspend. So the driver might need some
>>> tweaks if that assumption is not true in your case. The SMSC datasheet
>>> is quite comprehensive about this topic IIRC.
>> By AVDD you mean VDD33A?
> 
> Yes.
> 
>> Anyway, I have all the supplies except VDDVARIO shut down...
>> And the datasheet is indeed comprehensively describes chip power states
>> but I haven't found there anything about supplies required to stay on
>> during suspend...
> 
> In fact the datasheet doesn't really state that, and the chip seems
> to expect the power domains to remain switched on during suspend, and
> all power switching is done internally. Also the table in "7.4 Power
> Consumption (Device and System Components)" describes it like that.
> 
> So it all comes down to the question of how low-power you need to be,
> and whether you need wake-on-lan or not. What's currently implemented is
> D1, but adding support for D2 should be easy.

I did some brute force save/restore of smsc9220 registers and it seems
to wake up now.
The question now is how to make it in a "generic" way ...
Thanks for the help anyway :)

> Daniel


-- 
Sincerely yours,
Mike.

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

* Re: smsc911x suspend/resume
  2010-02-08 14:42         ` Mike Rapoport
@ 2010-02-08 14:49           ` Daniel Mack
  -1 siblings, 0 replies; 27+ messages in thread
From: Daniel Mack @ 2010-02-08 14:49 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: Steve Glendinning, netdev, LAKML

On Mon, Feb 08, 2010 at 04:42:25PM +0200, Mike Rapoport wrote:
> Daniel Mack wrote:
> > In fact the datasheet doesn't really state that, and the chip seems
> > to expect the power domains to remain switched on during suspend, and
> > all power switching is done internally. Also the table in "7.4 Power
> > Consumption (Device and System Components)" describes it like that.
> > 
> > So it all comes down to the question of how low-power you need to be,
> > and whether you need wake-on-lan or not. What's currently implemented is
> > D1, but adding support for D2 should be easy.
> 
> I did some brute force save/restore of smsc9220 registers and it seems
> to wake up now.
> The question now is how to make it in a "generic" way ...
> Thanks for the help anyway :)

Hmm, be careful about switching off power supplies that aren't supposed
to be switched off while others are still powered. You can easily
destroy hardware with that. Depending on how things are wired up
internally, voltages can leak from one unit block to the other. Maybe
Steve can can give a statement from official SMSC source about whether
it is safe to switch off VDD33A in this case.

Anyway, from what's written in the datasheet, I wouldn't dare just
blindly doing it.

Daniel

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

* smsc911x suspend/resume
@ 2010-02-08 14:49           ` Daniel Mack
  0 siblings, 0 replies; 27+ messages in thread
From: Daniel Mack @ 2010-02-08 14:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 08, 2010 at 04:42:25PM +0200, Mike Rapoport wrote:
> Daniel Mack wrote:
> > In fact the datasheet doesn't really state that, and the chip seems
> > to expect the power domains to remain switched on during suspend, and
> > all power switching is done internally. Also the table in "7.4 Power
> > Consumption (Device and System Components)" describes it like that.
> > 
> > So it all comes down to the question of how low-power you need to be,
> > and whether you need wake-on-lan or not. What's currently implemented is
> > D1, but adding support for D2 should be easy.
> 
> I did some brute force save/restore of smsc9220 registers and it seems
> to wake up now.
> The question now is how to make it in a "generic" way ...
> Thanks for the help anyway :)

Hmm, be careful about switching off power supplies that aren't supposed
to be switched off while others are still powered. You can easily
destroy hardware with that. Depending on how things are wired up
internally, voltages can leak from one unit block to the other. Maybe
Steve can can give a statement from official SMSC source about whether
it is safe to switch off VDD33A in this case.

Anyway, from what's written in the datasheet, I wouldn't dare just
blindly doing it.

Daniel

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

* Re: smsc911x suspend/resume
  2010-02-08 14:49           ` Daniel Mack
@ 2010-02-08 15:10             ` Mike Rapoport
  -1 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2010-02-08 15:10 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Steve Glendinning, netdev, LAKML

Daniel Mack wrote:
> On Mon, Feb 08, 2010 at 04:42:25PM +0200, Mike Rapoport wrote:
>> Daniel Mack wrote:
>>> In fact the datasheet doesn't really state that, and the chip seems
>>> to expect the power domains to remain switched on during suspend, and
>>> all power switching is done internally. Also the table in "7.4 Power
>>> Consumption (Device and System Components)" describes it like that.
>>>
>>> So it all comes down to the question of how low-power you need to be,
>>> and whether you need wake-on-lan or not. What's currently implemented is
>>> D1, but adding support for D2 should be easy.
>> I did some brute force save/restore of smsc9220 registers and it seems
>> to wake up now.
>> The question now is how to make it in a "generic" way ...
>> Thanks for the help anyway :)
> 
> Hmm, be careful about switching off power supplies that aren't supposed
> to be switched off while others are still powered. You can easily
> destroy hardware with that. Depending on how things are wired up
> internally, voltages can leak from one unit block to the other. Maybe
> Steve can can give a statement from official SMSC source about whether
> it is safe to switch off VDD33A in this case.
> 
> Anyway, from what's written in the datasheet, I wouldn't dare just
> blindly doing it.

I haven't dig too much in the datasheet, but I cannot remember anything
about keeping certain power supplies on during suspend. The only clue is
your comment in the driver that states
"/* This implementation assumes the devices remains powered on its VDDVARIO
  * pins during suspend. */"
And the platform I have either disables all supplies but VDDVARIO or keeps them
all up.
Anyway, I'll leave it running sleep/resume/ping cycle overnight to see in the
morning what have burned :)



> Daniel


-- 
Sincerely yours,
Mike.


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

* smsc911x suspend/resume
@ 2010-02-08 15:10             ` Mike Rapoport
  0 siblings, 0 replies; 27+ messages in thread
From: Mike Rapoport @ 2010-02-08 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

Daniel Mack wrote:
> On Mon, Feb 08, 2010 at 04:42:25PM +0200, Mike Rapoport wrote:
>> Daniel Mack wrote:
>>> In fact the datasheet doesn't really state that, and the chip seems
>>> to expect the power domains to remain switched on during suspend, and
>>> all power switching is done internally. Also the table in "7.4 Power
>>> Consumption (Device and System Components)" describes it like that.
>>>
>>> So it all comes down to the question of how low-power you need to be,
>>> and whether you need wake-on-lan or not. What's currently implemented is
>>> D1, but adding support for D2 should be easy.
>> I did some brute force save/restore of smsc9220 registers and it seems
>> to wake up now.
>> The question now is how to make it in a "generic" way ...
>> Thanks for the help anyway :)
> 
> Hmm, be careful about switching off power supplies that aren't supposed
> to be switched off while others are still powered. You can easily
> destroy hardware with that. Depending on how things are wired up
> internally, voltages can leak from one unit block to the other. Maybe
> Steve can can give a statement from official SMSC source about whether
> it is safe to switch off VDD33A in this case.
> 
> Anyway, from what's written in the datasheet, I wouldn't dare just
> blindly doing it.

I haven't dig too much in the datasheet, but I cannot remember anything
about keeping certain power supplies on during suspend. The only clue is
your comment in the driver that states
"/* This implementation assumes the devices remains powered on its VDDVARIO
  * pins during suspend. */"
And the platform I have either disables all supplies but VDDVARIO or keeps them
all up.
Anyway, I'll leave it running sleep/resume/ping cycle overnight to see in the
morning what have burned :)



> Daniel


-- 
Sincerely yours,
Mike.

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

* Re: smsc911x suspend/resume
  2010-02-08 14:49           ` Daniel Mack
@ 2010-02-11 18:26             ` Steve.Glendinning at smsc.com
  -1 siblings, 0 replies; 27+ messages in thread
From: Steve.Glendinning @ 2010-02-11 18:26 UTC (permalink / raw)
  To: Daniel Mack
  Cc: netdev, linux-arm-kernel-bounces, Ian.Saturley, LAKML, Mike Rapoport

> Hmm, be careful about switching off power supplies that aren't supposed
> to be switched off while others are still powered. You can easily
> destroy hardware with that. Depending on how things are wired up
> internally, voltages can leak from one unit block to the other. Maybe
> Steve can can give a statement from official SMSC source about whether
> it is safe to switch off VDD33A in this case.

I've checked with the chip architects, no power planes should be 
externally
switched off in any suspend mode.

Steve

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

* smsc911x suspend/resume
@ 2010-02-11 18:26             ` Steve.Glendinning at smsc.com
  0 siblings, 0 replies; 27+ messages in thread
From: Steve.Glendinning at smsc.com @ 2010-02-11 18:26 UTC (permalink / raw)
  To: linux-arm-kernel

> Hmm, be careful about switching off power supplies that aren't supposed
> to be switched off while others are still powered. You can easily
> destroy hardware with that. Depending on how things are wired up
> internally, voltages can leak from one unit block to the other. Maybe
> Steve can can give a statement from official SMSC source about whether
> it is safe to switch off VDD33A in this case.

I've checked with the chip architects, no power planes should be 
externally
switched off in any suspend mode.

Steve

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

* Re: smsc911x suspend/resume
  2010-02-11 18:26             ` Steve.Glendinning at smsc.com
@ 2010-02-14  9:01               ` mike at compulab.co.il
  -1 siblings, 0 replies; 27+ messages in thread
From: mike @ 2010-02-14  9:01 UTC (permalink / raw)
  To: Steve.Glendinning
  Cc: netdev, linux-arm-kernel-bounces, LAKML, Daniel Mack, Ian.Saturley

On Thu, Feb 11, 2010 at 06:26:32PM +0000, Steve.Glendinning@smsc.com wrote:
> > Hmm, be careful about switching off power supplies that aren't supposed
> > to be switched off while others are still powered. You can easily
> > destroy hardware with that. Depending on how things are wired up
> > internally, voltages can leak from one unit block to the other. Maybe
> > Steve can can give a statement from official SMSC source about whether
> > it is safe to switch off VDD33A in this case.
> 
> I've checked with the chip architects, no power planes should be 
> externally
> switched off in any suspend mode.

The question if they *can* be switched off. With the hardware I have,
most of 3.3V supplies are enabled/disabled with the same control. So, to
have maximal power saving in the system, I just pull this control to
disable 3.3V supplies, VDD33A among them. If smsc9220 can tolerate
switching VDD33A during suspend, I can send a patch that allows proper
wake-up with such conditions.

> Steve

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

* smsc911x suspend/resume
@ 2010-02-14  9:01               ` mike at compulab.co.il
  0 siblings, 0 replies; 27+ messages in thread
From: mike at compulab.co.il @ 2010-02-14  9:01 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Feb 11, 2010 at 06:26:32PM +0000, Steve.Glendinning at smsc.com wrote:
> > Hmm, be careful about switching off power supplies that aren't supposed
> > to be switched off while others are still powered. You can easily
> > destroy hardware with that. Depending on how things are wired up
> > internally, voltages can leak from one unit block to the other. Maybe
> > Steve can can give a statement from official SMSC source about whether
> > it is safe to switch off VDD33A in this case.
> 
> I've checked with the chip architects, no power planes should be 
> externally
> switched off in any suspend mode.

The question if they *can* be switched off. With the hardware I have,
most of 3.3V supplies are enabled/disabled with the same control. So, to
have maximal power saving in the system, I just pull this control to
disable 3.3V supplies, VDD33A among them. If smsc9220 can tolerate
switching VDD33A during suspend, I can send a patch that allows proper
wake-up with such conditions.

> Steve

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

* smsc911x suspend/resume
@ 2015-03-06  9:16 Ran Shalit
  0 siblings, 0 replies; 27+ messages in thread
From: Ran Shalit @ 2015-03-06  9:16 UTC (permalink / raw)
  To: linux-pm

Hello,

I try to figure out when the resume function is called in smsc911x driver:
http://lxr.free-electrons.com/source/drivers/net/ethernet/smsc/smsc911x.c
According to datasheet
http://ww1.microchip.com/downloads/en/DeviceDoc/9220.pdf
There is the following sequence:
1. host set mode to D1 (sleep, WOL)
2. smsc wakes and through PME interrupt
3. host should set mode to D0 (in order to get to normal operation).

I see that resume is doing stage (3) above, but I don't see how (2) is
done, is it that resume is automatically called whenever there is
interrupt ?

Thank you,
Ran

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

end of thread, other threads:[~2015-03-06  9:16 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-08  9:42 smsc911x suspend/resume Mike Rapoport
2010-02-08  9:42 ` Mike Rapoport
2010-02-08 10:11 ` Daniel Mack
2010-02-08 10:11   ` Daniel Mack
2010-02-08 11:30   ` Mike Rapoport
2010-02-08 11:30     ` Mike Rapoport
2010-02-08 11:46     ` Daniel Mack
2010-02-08 11:46       ` Daniel Mack
2010-02-08 14:42       ` Mike Rapoport
2010-02-08 14:42         ` Mike Rapoport
2010-02-08 14:49         ` Daniel Mack
2010-02-08 14:49           ` Daniel Mack
2010-02-08 15:10           ` Mike Rapoport
2010-02-08 15:10             ` Mike Rapoport
2010-02-11 18:26           ` Steve.Glendinning
2010-02-11 18:26             ` Steve.Glendinning at smsc.com
2010-02-14  9:01             ` mike
2010-02-14  9:01               ` mike at compulab.co.il
2010-02-08 11:46     ` Steve.Glendinning
2010-02-08 11:46       ` Steve.Glendinning at smsc.com
2010-02-08 11:53       ` Daniel Mack
2010-02-08 11:53         ` Daniel Mack
2010-02-08 12:27         ` Steve.Glendinning
2010-02-08 12:27           ` Steve.Glendinning at smsc.com
2010-02-08 13:55       ` Mike Rapoport
2010-02-08 13:55         ` Mike Rapoport
2015-03-06  9:16 Ran Shalit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.