mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joshua Kwan <joshk@triplehelix.org>
To: linux-kernel@vger.kernel.org
Cc: pavel@ucw.cz, perex@suse.cz
Subject: Re: [2.6.10-rc2] In-kernel swsusp broken
Date: Fri, 03 Dec 2004 23:52:14 -0800	[thread overview]
Message-ID: <41B16CAE.9010300@triplehelix.org> (raw)
In-Reply-To: <20041203222057.6334668d.akpm@osdl.org>

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

[CC:ing Jaroslav, solution involving ALSA code is attached.]

Andrew Morton wrote:
> Yes, if you could apply something like the below and see if we can see
> which driver is causing the problem?  Make sure that CONFIG_PCI_NAMES is
> set...

Yeah, did that (didn't use yours), and apparently all the suspend 
functions return 0 but it died after pcibios_set_master on several 
devices - the last call succeeded (it was my intel8x0 sound card) and 
thereafter the hang occurred.

I noticed a recent -mm patch added

pci_disable_device(chip->pci);

in sound/pci/intel8x0.c -> intel8x0_suspend. Looks like that didn't 
help; I also had to add a pci_save_state(chip->pci) above that for 
suspend to work, mimicking the way USB seemed to handle suspending, and 
that worked! Had to do that for intel8x0m.c as well. I looked for other 
instances of disable_device in sound/pci and saw many 
pci_set_power_state(pdev, 3). Would that have a similar effect to saving 
the state? Should I have used that instead? Well, you be the judge...

I'm not really sure what to send a diff against, but I figure -rc3 is 
best so that other people can take advantage of the fix without having 
to patch to -mm first.

Signed-off-by: Joshua Kwan <joshk@triplehelix.org>

-- 
Joshua Kwan

[-- Attachment #2: intel8x0-save-pci-state.patch --]
[-- Type: text/x-patch, Size: 778 bytes --]

--- linux-2.6.9/sound/pci/intel8x0.c~	2004-12-03 23:44:28.000000000 -0800
+++ linux-2.6.9/sound/pci/intel8x0.c	2004-12-03 23:44:36.000000000 -0800
@@ -2279,6 +2279,8 @@
 	for (i = 0; i < 3; i++)
 		if (chip->ac97[i])
 			snd_ac97_suspend(chip->ac97[i]);
+	pci_save_state(chip->pci);
+	pci_disable_device(chip->pci);
 	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }
--- linux-2.6.9/sound/pci/intel8x0m.c~	2004-12-03 23:44:42.000000000 -0800
+++ linux-2.6.9/sound/pci/intel8x0m.c	2004-12-03 23:44:57.000000000 -0800
@@ -1091,6 +1091,8 @@
 		snd_pcm_suspend_all(chip->pcm[i]);
 	if (chip->ac97)
 		snd_ac97_suspend(chip->ac97);
+	pci_save_state(chip->pci);
+	pci_disable_device(chip->pci);
 	snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 	return 0;
 }

      parent reply	other threads:[~2004-12-04  7:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-19  9:52 Joshua Kwan
     [not found] ` <20041129164112.3d51be93.akpm@osdl.org>
2004-12-04  3:05   ` Joshua Kwan
     [not found]     ` <20041203195245.29e7ce03.akpm@osdl.org>
2004-12-04  5:25       ` Joshua Kwan
     [not found]         ` <20041203222057.6334668d.akpm@osdl.org>
2004-12-04  7:52           ` Joshua Kwan [this message]

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=41B16CAE.9010300@triplehelix.org \
    --to=joshk@triplehelix.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=perex@suse.cz \
    /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

Powered by JetHome