public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Andrey Savochkin <saw@saw.sw.com.sg>
Cc: linux-kernel@vger.kernel.org, Scott Robinson <scott@tranzoa.com>
Subject: Re: eepro100 problems in 2.4.0
Date: Sat, 27 Jan 2001 11:30:40 -0500	[thread overview]
Message-ID: <3A72F7B0.9F6AA989@mandrakesoft.com> (raw)
In-Reply-To: <006601c08711$4bdfb600$9b2f4189@angelw2k> <3A709504.5599E0F7@mandrakesoft.com> <3A70985F.E5A0AB7F@mandrakesoft.com> <20010126085037.B467@saw.sw.com.sg>

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

Andrey Savochkin wrote:
> 
> Hi,
> 
> On Thu, Jan 25, 2001 at 04:19:27PM -0500, Jeff Garzik wrote:
> > Oops, sorry guys.  Thanks to DaveM for correcting me -- my patch has
> > nothing to do with the "card reports no resources" problem.  My
> > apologies.
> 
> No problems.
> 
> However, there is a real problem with eepro100 when the system resumes
> operations after a sleep.
> May be, you could guess what's wrong in this case?

The regions shouldn't be disabled, the attached patch (against
2.4.1-pre10) adds a call to pci_enable_device to enable things in
eepro100_resume().

It also includes the patch I posted previously; the patch itself is
correct -- the pci_enable_device call should be moved up -- however it
was my description of the patch ("fixes 'card has no resources'") which
was completely incorrect.

Scott, does the attached patch help you out?

	Jeff


-- 
Jeff Garzik       | "You see, in this world there's two kinds of
Building 1024     |  people, my friend: Those with loaded guns
MandrakeSoft      |  and those who dig. You dig."  --Blondie

[-- Attachment #2: eepro100.patch --]
[-- Type: text/plain, Size: 1311 bytes --]

Index: linux_2_4/drivers/net/eepro100.c
diff -u linux_2_4/drivers/net/eepro100.c:1.1.1.9 linux_2_4/drivers/net/eepro100.c:1.1.1.9.42.4
--- linux_2_4/drivers/net/eepro100.c:1.1.1.9	Sat Nov 25 15:53:20 2000
+++ linux_2_4/drivers/net/eepro100.c	Sat Jan 27 08:27:00 2001
@@ -560,6 +560,9 @@
 	if (speedo_debug > 0  &&  did_version++ == 0)
 		printk(version);
 
+	if (pci_enable_device(pdev))
+		return -EIO;
+
 	if (!request_region(pci_resource_start(pdev, 1),
 			pci_resource_len(pdev, 1), "eepro100")) {
 		printk (KERN_ERR "eepro100: cannot reserve I/O ports\n");
@@ -598,9 +601,6 @@
 		acpi_idle_state = pwr_command & PCI_PM_CTRL_STATE_MASK;
 	}
 
-	if (pci_enable_device(pdev))
-		goto err_out_free_mmio_region;
-
 	pci_set_master(pdev);
 
 	if (speedo_found1(pdev, ioaddr, cards_found, acpi_idle_state) == 0)
@@ -2146,6 +2146,13 @@
 	struct net_device *dev = pdev->driver_data;
 	struct speedo_private *sp = (struct speedo_private *)dev->priv;
 	long ioaddr = dev->base_addr;
+
+	/* Make sure power state is D0, a.k.a. alive, and also
+	 * make sure PIO and MMIO are active.  Apparently some
+	 * cases exist where PCI_COMMAND_{IO,MEM} is not set when
+	 * we return from resume. -jgarzik
+	 */
+	pci_enable_device(pdev);
 
 	/* I'm absolutely uncertain if this part of code may work.
 	   The problems are:

  reply	other threads:[~2001-01-27 16:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-25 20:54 eepro100 problems in 2.4.0 Micah Gorrell
2001-01-25 21:05 ` [PATCH] " Jeff Garzik
2001-01-25 21:19   ` Jeff Garzik
2001-01-26  0:50     ` Andrey Savochkin
2001-01-27 16:30       ` Jeff Garzik [this message]
2001-01-25 21:06 ` Sergey Kubushin
  -- strict thread matches above, loose matches on Subject: below --
2001-01-26 11:13 Torben Mathiasen
2001-01-25 20:20 Micah Gorrell
2001-01-25 20:29 ` Sergey Kubushin
2001-01-25 20:44 ` Tom Sightler
2001-01-29  9:13 ` Andrey Savochkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A72F7B0.9F6AA989@mandrakesoft.com \
    --to=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saw@saw.sw.com.sg \
    --cc=scott@tranzoa.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox