2002-02-25 20:03:02

by christophe barbé

[permalink] [raw]
Subject: suspend/resume and 3c59x

Hi,

I use the kernel 2.4.17 and the hotplug facilities for my 3com cardbus
(driver 3c59x). It works well when I insert and remove the card.
But If I don't remove the card before suspending (apm -s) my laptop,
The card is in a bad state when I resume the laptop and I need to remove
and insert the card to get it back. I have tried to ifdown and rmmod
before suspending but the result is the same.

Am i missing something ?

I understand it is a resume/suspend issue (not a hotplug issue).
What need to be done in the driver to support the suspending of the
card ?

Christophe

--
Christophe Barb? <[email protected]>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E

There is no snooze button on a cat who wants breakfast.


Attachments:
(No filename) (758.00 B)
(No filename) (241.00 B)
Download all attachments

2002-02-25 20:21:54

by Andrew Morton

[permalink] [raw]
Subject: Re: suspend/resume and 3c59x

christophe barb? wrote:
>
> Hi,
>
> I use the kernel 2.4.17 and the hotplug facilities for my 3com cardbus
> (driver 3c59x). It works well when I insert and remove the card.
> But If I don't remove the card before suspending (apm -s) my laptop,
> The card is in a bad state when I resume the laptop and I need to remove
> and insert the card to get it back. I have tried to ifdown and rmmod
> before suspending but the result is the same.
>

Did you provide the `enable_wol=1' module parameter?

options 3c59x enable_wol=1

Despite its name, this turns on some power management
functionality. Should have been a separate "enable_pm".

-

2002-02-25 23:29:29

by Andreas Dilger

[permalink] [raw]
Subject: Re: suspend/resume and 3c59x

On Feb 25, 2002 12:20 -0800, Andrew Morton wrote:
> christophe barb? wrote:
> > I use the kernel 2.4.17 and the hotplug facilities for my 3com cardbus
> > (driver 3c59x). It works well when I insert and remove the card.
> > But If I don't remove the card before suspending (apm -s) my laptop,
> > The card is in a bad state when I resume the laptop and I need to remove
> > and insert the card to get it back. I have tried to ifdown and rmmod
> > before suspending but the result is the same.
>
> Did you provide the `enable_wol=1' module parameter?
>
> options 3c59x enable_wol=1
>
> Despite its name, this turns on some power management
> functionality. Should have been a separate "enable_pm".

Hmm, I have a similar problem with my Xircom 10/100 adapter (xirc2ps_cs).
On resume it never works, so I eject/insert it each resume (via cardctl).
My 3cce589et (10Mbps) card does not have this problem.

In dmesg xirc2ps_cs reports:
eth0: media 10Base2, silicon revision 4

On a normal insertion it reports:
eth0: MII link partner: 0081
eth0: MII selected
eth0: media 100BaseT, silicon revision 5

I'm not sure if that is the real problem or just a symptom. I'll have to
look if it supports the enable_wol parameter... Nope. Any ideas? 2.4.17

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

2002-02-25 23:33:59

by christophe barbé

[permalink] [raw]
Subject: Re: suspend/resume and 3c59x

Thank Andrew.
My problem is solved with 2.4.18 and 'options 3c59x enable_wol=1'.

Christophe

On Mon, Feb 25, 2002 at 12:20:05PM -0800, Andrew Morton wrote:
> christophe barb? wrote:
> >
> > Hi,
> >
> > I use the kernel 2.4.17 and the hotplug facilities for my 3com cardbus
> > (driver 3c59x). It works well when I insert and remove the card.
> > But If I don't remove the card before suspending (apm -s) my laptop,
> > The card is in a bad state when I resume the laptop and I need to remove
> > and insert the card to get it back. I have tried to ifdown and rmmod
> > before suspending but the result is the same.
> >
>
> Did you provide the `enable_wol=1' module parameter?
>
> options 3c59x enable_wol=1
>
> Despite its name, this turns on some power management
> functionality. Should have been a separate "enable_pm".
>
> -
> -
> 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/

--
Christophe Barb? <[email protected]>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E

Cats seem go on the principle that it never does any harm to ask for
what you want. --Joseph Wood Krutch


Attachments:
(No filename) (1.29 kB)
(No filename) (241.00 B)
Download all attachments

2002-02-25 23:38:49

by christophe barbé

[permalink] [raw]
Subject: Re: suspend/resume and 3c59x

On Mon, Feb 25, 2002 at 04:28:05PM -0700, Andreas Dilger wrote:
> On Feb 25, 2002 12:20 -0800, Andrew Morton wrote:
> > christophe barb? wrote:
> Hmm, I have a similar problem with my Xircom 10/100 adapter (xirc2ps_cs).
> On resume it never works, so I eject/insert it each resume (via cardctl).
> My 3cce589et (10Mbps) card does not have this problem.
>
> In dmesg xirc2ps_cs reports:
> eth0: media 10Base2, silicon revision 4
>
> On a normal insertion it reports:
> eth0: MII link partner: 0081
> eth0: MII selected
> eth0: media 100BaseT, silicon revision 5
>
> I'm not sure if that is the real problem or just a symptom. I'll have to
> look if it supports the enable_wol parameter... Nope. Any ideas? 2.4.17

My first Idea was to add a script in apm/event.d but I have a cardbus
managed by hotplug and it doesn't provide a way to do a soft eject as
you can do with cardctl.

Hoppefully my problem is solved with 2.4.18.

Christophe

>
> Cheers, Andreas
> --
> Andreas Dilger
> http://sourceforge.net/projects/ext2resize/
> http://www-mddsp.enel.ucalgary.ca/People/adilger/
>
> -
> 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/

--
Christophe Barb? <[email protected]>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E

Dogs believe they are human. Cats believe they are God.


Attachments:
(No filename) (1.49 kB)
(No filename) (241.00 B)
Download all attachments

2002-02-26 00:04:37

by Andrew Morton

[permalink] [raw]
Subject: Re: suspend/resume and 3c59x

christophe barb? wrote:
>
> Thank Andrew.
> My problem is solved with 2.4.18 and 'options 3c59x enable_wol=1'.
>

Right, thanks.

Just for the record: Both Christophe's 3c<mumble> and my 3c556B
mini-PCI NIC failed to survive APM resumes in 2.4.17. But something
outside the 3c59x driver got fixed somewhere in the 2.4.18-pre series,
and resume works OK in 2.4.18.

-

2002-02-26 13:12:41

by Stephen Rothwell

[permalink] [raw]
Subject: Re: suspend/resume and 3c59x

On Mon, 25 Feb 2002 16:02:52 -0800 Andrew Morton <[email protected]> wrote:
>
> Just for the record: Both Christophe's 3c<mumble> and my 3c556B
> mini-PCI NIC failed to survive APM resumes in 2.4.17. But something
> outside the 3c59x driver got fixed somewhere in the 2.4.18-pre series,
> and resume works OK in 2.4.18.

We now notify (and wait for a response from) user mode processes about
the pending suspend BEFORE we notify the drivers. We used to do this the
other way around (which was never correct - mea culpa).

This MAY have changed the behaviour of the drivers ...

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/

2002-02-26 15:14:21

by christophe barbé

[permalink] [raw]
Subject: Re: suspend/resume and 3c59x

On Wed, Feb 27, 2002 at 12:11:44AM +1100, Stephen Rothwell wrote:
> On Mon, 25 Feb 2002 16:02:52 -0800 Andrew Morton <[email protected]> wrote:
> >
> > Just for the record: Both Christophe's 3c<mumble> and my 3c556B
> > mini-PCI NIC failed to survive APM resumes in 2.4.17. But something
> > outside the 3c59x driver got fixed somewhere in the 2.4.18-pre series,
> > and resume works OK in 2.4.18.
>
> We now notify (and wait for a response from) user mode processes about
> the pending suspend BEFORE we notify the drivers. We used to do this the
> other way around (which was never correct - mea culpa).
>
> This MAY have changed the behaviour of the drivers ...

Unfortunately after a few experiments my 3c59x does not resume correctly
with 2.4.18. I don't understand why but sometimes it takes a few seconds
to return in a good state after a suspend/resume cycle and sometimes (at
least one time) the card stay in a bad state.

Would it be possible that the driver is never notified that the machine
is going in a suspend mode ?
When you said 'we now notify ...' the 'we' stand for apm ?

Looking in the driver, the enable_wol (now I know that wol means Wake up
on Lan, and I would prefer let this option disabled but it also turn on
pm stuff as Andrew told me) enables few acpi call.

Andrew : Is your card back immediately after resuming ?

Christophe


>
> --
> Cheers,
> Stephen Rothwell [email protected]
> http://www.canb.auug.org.au/~sfr/
> -
> 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/

--
Christophe Barb? <[email protected]>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E

Thousands of years ago, cats were worshipped as gods.
Cats have never forgotten this. --Anonymous


Attachments:
(No filename) (1.91 kB)
(No filename) (241.00 B)
Download all attachments

2002-02-26 16:59:21

by christophe barbé

[permalink] [raw]
Subject: Re: suspend/resume and 3c59x


I am trying to understand where is the problem.
One thing I'm sure right now is that the 3c59x as a problem.
After a card remove/insert cycle the option enable_wol is no more
enabled.

Christophe

On Tue, Feb 26, 2002 at 10:13:04AM -0500, christophe barb? wrote:
> On Wed, Feb 27, 2002 at 12:11:44AM +1100, Stephen Rothwell wrote:
> > On Mon, 25 Feb 2002 16:02:52 -0800 Andrew Morton <[email protected]> wrote:
> > >
> > > Just for the record: Both Christophe's 3c<mumble> and my 3c556B
> > > mini-PCI NIC failed to survive APM resumes in 2.4.17. But something
> > > outside the 3c59x driver got fixed somewhere in the 2.4.18-pre series,
> > > and resume works OK in 2.4.18.
> >
> > We now notify (and wait for a response from) user mode processes about
> > the pending suspend BEFORE we notify the drivers. We used to do this the
> > other way around (which was never correct - mea culpa).
> >
> > This MAY have changed the behaviour of the drivers ...
>
> Unfortunately after a few experiments my 3c59x does not resume correctly
> with 2.4.18. I don't understand why but sometimes it takes a few seconds
> to return in a good state after a suspend/resume cycle and sometimes (at
> least one time) the card stay in a bad state.
>
> Would it be possible that the driver is never notified that the machine
> is going in a suspend mode ?
> When you said 'we now notify ...' the 'we' stand for apm ?
>
> Looking in the driver, the enable_wol (now I know that wol means Wake up
> on Lan, and I would prefer let this option disabled but it also turn on
> pm stuff as Andrew told me) enables few acpi call.
>
> Andrew : Is your card back immediately after resuming ?
>
> Christophe
>
>
> >
> > --
> > Cheers,
> > Stephen Rothwell [email protected]
> > http://www.canb.auug.org.au/~sfr/
> > -
> > 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/
>
> --
> Christophe Barb? <[email protected]>
> GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E
>
> Thousands of years ago, cats were worshipped as gods.
> Cats have never forgotten this. --Anonymous



--
Christophe Barb? <[email protected]>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E

Thousands of years ago, cats were worshipped as gods.
Cats have never forgotten this. --Anonymous


Attachments:
(No filename) (2.48 kB)
(No filename) (241.00 B)
Download all attachments