* [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (0/2)
@ 2005-07-26 10:47 Rafael J. Wysocki
[not found] ` <200507261247.05684.rjw-KKrjLPT3xs0@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Rafael J. Wysocki @ 2005-07-26 10:47 UTC (permalink / raw)
To: LKML; +Cc: ACPI mailing list, Andrew Morton,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw
Hi,
The following two patches are necessary to prevent my box (Asus L5D) from
hanging solid during resume from disk.
The problem is that, apparently, some out-of-order interrupts may be
generated during resume and if some drivers do not call free_irq() on
suspend, these interrupts are mishandled. For reference please see
http://bugzilla.kernel.org/show_bug.cgi?id=4416
and
http://sourceforge.net/mailarchive/message.php?msg_id=12448907
The first patch adds free_irq() and request_irq() to the suspend and resume
routines, respectively, in the snd_intel8x0 driver.
The second one adds basic suspend/resume support to the sk98lin driver.
Please consider for applying,
Rafael
--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
^ permalink raw reply [flat|nested] 15+ messages in thread[parent not found: <200507261247.05684.rjw-KKrjLPT3xs0@public.gmane.org>]
* [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (1/2) [not found] ` <200507261247.05684.rjw-KKrjLPT3xs0@public.gmane.org> @ 2005-07-26 10:51 ` Rafael J. Wysocki [not found] ` <200507261251.48291.rjw-KKrjLPT3xs0@public.gmane.org> 2005-07-26 10:54 ` [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (2/2) Rafael J. Wysocki 1 sibling, 1 reply; 15+ messages in thread From: Rafael J. Wysocki @ 2005-07-26 10:51 UTC (permalink / raw) To: LKML; +Cc: ACPI mailing list, Andrew Morton, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw The following patch adds free_irq() and request_irq() to the suspend and resume, respectively, routines in the snd_intel8x0 driver. Signed-off-by: Rafael J. Wysocki <rjw-KKrjLPT3xs0@public.gmane.org> --- linux-2.6.13-rc3-git5/sound/pci/intel8x0.c 2005-07-23 19:26:43.000000000 +0200 +++ patched/sound/pci/intel8x0.c 2005-07-25 18:21:36.000000000 +0200 @@ -2373,6 +2373,8 @@ static int intel8x0_suspend(snd_card_t * for (i = 0; i < 3; i++) if (chip->ac97[i]) snd_ac97_suspend(chip->ac97[i]); + if (chip->irq >= 0) + free_irq(chip->irq, (void *)chip); pci_disable_device(chip->pci); return 0; } @@ -2384,7 +2386,14 @@ static int intel8x0_resume(snd_card_t *c pci_enable_device(chip->pci); pci_set_master(chip->pci); - snd_intel8x0_chip_init(chip, 0); + if (request_irq(chip->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip)) { + snd_printk("unable to grab IRQ %d\n", chip->irq); + chip->irq = -1; + pci_disable_device(chip->pci); + return -EBUSY; + } + synchronize_irq(chip->irq); + snd_intel8x0_chip_init(chip, 1); /* refill nocache */ if (chip->fix_nocache) ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <200507261251.48291.rjw-KKrjLPT3xs0@public.gmane.org>]
* Re: [Alsa-devel] [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (1/2) [not found] ` <200507261251.48291.rjw-KKrjLPT3xs0@public.gmane.org> @ 2005-07-27 8:53 ` Takashi Iwai 2005-07-27 20:52 ` [ACPI] " Pavel Machek 0 siblings, 1 reply; 15+ messages in thread From: Takashi Iwai @ 2005-07-27 8:53 UTC (permalink / raw) To: Rafael J. Wysocki Cc: LKML, ACPI mailing list, Andrew Morton, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw At Tue, 26 Jul 2005 12:51:47 +0200, Rafael J. Wysocki wrote: > > The following patch adds free_irq() and request_irq() to the suspend and > resume, respectively, routines in the snd_intel8x0 driver. The patch looks OK to me although I have some concerns. - The error in resume can't be handled properly. What should we do for the error of request_irq()? - Adding this to all drivers seem too much. We just need to stop the irq processing until resume, so something like suspend_irq(irq, dev_id) and resume_irq(irq, dev_id) would be more uesful? Takashi ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ACPI] Re: [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (1/2) 2005-07-27 8:53 ` [Alsa-devel] " Takashi Iwai @ 2005-07-27 20:52 ` Pavel Machek [not found] ` <20050727205249.GA708-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Pavel Machek @ 2005-07-27 20:52 UTC (permalink / raw) To: Takashi Iwai Cc: Rafael J. Wysocki, LKML, ACPI mailing list, Andrew Morton, alsa-devel Hi! > > The following patch adds free_irq() and request_irq() to the suspend and > > resume, respectively, routines in the snd_intel8x0 driver. > > The patch looks OK to me although I have some concerns. > > - The error in resume can't be handled properly. > > What should we do for the error of request_irq()? > > - Adding this to all drivers seem too much. There's probably no other way. Talk to Len Brown. > We just need to stop the irq processing until resume, so something > like suspend_irq(irq, dev_id) and resume_irq(irq, dev_id) would be > more uesful? Its more complex than that. Irq numbers may change during resume. -- 64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20050727205249.GA708-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>]
* Re: Re: [Alsa-devel] [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (1/2) [not found] ` <20050727205249.GA708-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org> @ 2005-07-28 8:06 ` Takashi Iwai [not found] ` <s5hr7djtkvo.wl%tiwai-l3A5Bk7waGM@public.gmane.org> ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Takashi Iwai @ 2005-07-28 8:06 UTC (permalink / raw) To: Pavel Machek Cc: Rafael J. Wysocki, LKML, ACPI mailing list, Andrew Morton, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw At Wed, 27 Jul 2005 22:52:49 +0200, Pavel Machek wrote: > > Hi! > > > > The following patch adds free_irq() and request_irq() to the suspend and > > > resume, respectively, routines in the snd_intel8x0 driver. > > > > The patch looks OK to me although I have some concerns. > > > > - The error in resume can't be handled properly. > > > > What should we do for the error of request_irq()? > > > > - Adding this to all drivers seem too much. > > There's probably no other way. Talk to Len Brown. > > > We just need to stop the irq processing until resume, so something > > like suspend_irq(irq, dev_id) and resume_irq(irq, dev_id) would be > > more uesful? > > Its more complex than that. Irq numbers may change during resume. Hmm, then the patch looks wrong. It assumes that the irq number is as same as before suspend. Sorry for ignorance, but, is only irq affected? Are the other resources like ioport consistent after resume? Takashi ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <s5hr7djtkvo.wl%tiwai-l3A5Bk7waGM@public.gmane.org>]
* Re: Re: [Alsa-devel] [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (1/2) [not found] ` <s5hr7djtkvo.wl%tiwai-l3A5Bk7waGM@public.gmane.org> @ 2005-07-28 8:31 ` Pavel Machek 0 siblings, 0 replies; 15+ messages in thread From: Pavel Machek @ 2005-07-28 8:31 UTC (permalink / raw) To: Takashi Iwai Cc: Rafael J. Wysocki, LKML, ACPI mailing list, Andrew Morton, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Len Brown Hi! > > > > The following patch adds free_irq() and request_irq() to the suspend and > > > > resume, respectively, routines in the snd_intel8x0 driver. > > > > > > The patch looks OK to me although I have some concerns. > > > > > > - The error in resume can't be handled properly. > > > > > > What should we do for the error of request_irq()? > > > > > > - Adding this to all drivers seem too much. > > > > There's probably no other way. Talk to Len Brown. > > > > > We just need to stop the irq processing until resume, so something > > > like suspend_irq(irq, dev_id) and resume_irq(irq, dev_id) would be > > > more uesful? > > > > Its more complex than that. Irq numbers may change during resume. > > Hmm, then the patch looks wrong. It assumes that the irq number is > as same as before suspend. > Sorry for ignorance, but, is only irq affected? Are the other > resources like ioport consistent after resume? I think it is only irq, but Len, please take correct me if I'm wrong. Irq number can change during suspend/resume cycle, right? Pavel -- teflon -- maybe it is a trademark, but it should not be. ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ACPI] Re: [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (1/2) 2005-07-28 8:06 ` Re: [Alsa-devel] " Takashi Iwai [not found] ` <s5hr7djtkvo.wl%tiwai-l3A5Bk7waGM@public.gmane.org> @ 2005-07-28 8:37 ` Shaohua Li 2005-07-28 8:43 ` Rafael J. Wysocki 2 siblings, 0 replies; 15+ messages in thread From: Shaohua Li @ 2005-07-28 8:37 UTC (permalink / raw) To: Takashi Iwai Cc: Pavel Machek, Rafael J. Wysocki, LKML, ACPI mailing list, Andrew Morton, alsa-devel On Thu, 2005-07-28 at 10:06 +0200, Takashi Iwai wrote: > At Wed, 27 Jul 2005 22:52:49 +0200, > Pavel Machek wrote: > > > > Hi! > > > > > > The following patch adds free_irq() and request_irq() to the suspend and > > > > resume, respectively, routines in the snd_intel8x0 driver. > > > > > > The patch looks OK to me although I have some concerns. > > > > > > - The error in resume can't be handled properly. > > > > > > What should we do for the error of request_irq()? > > > > > > - Adding this to all drivers seem too much. > > > > There's probably no other way. Talk to Len Brown. > > > > > We just need to stop the irq processing until resume, so something > > > like suspend_irq(irq, dev_id) and resume_irq(irq, dev_id) would be > > > more uesful? > > > > Its more complex than that. Irq numbers may change during resume. > > Hmm, then the patch looks wrong. It assumes that the irq number is > as same as before suspend. > > Sorry for ignorance, but, is only irq affected? Are the other > resources like ioport consistent after resume? Resource changes might be helpful for resource balance (device hotplug). But suspend/resume doesn't use it. So resources are consistent after resume except irq to me. Thanks, Shaohua ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [ACPI] Re: [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (1/2) 2005-07-28 8:06 ` Re: [Alsa-devel] " Takashi Iwai [not found] ` <s5hr7djtkvo.wl%tiwai-l3A5Bk7waGM@public.gmane.org> 2005-07-28 8:37 ` [ACPI] " Shaohua Li @ 2005-07-28 8:43 ` Rafael J. Wysocki [not found] ` <200507281043.14697.rjw-KKrjLPT3xs0@public.gmane.org> 2 siblings, 1 reply; 15+ messages in thread From: Rafael J. Wysocki @ 2005-07-28 8:43 UTC (permalink / raw) To: Takashi Iwai Cc: Pavel Machek, LKML, ACPI mailing list, Andrew Morton, alsa-devel Hi, On Thursday, 28 of July 2005 10:06, Takashi Iwai wrote: > At Wed, 27 Jul 2005 22:52:49 +0200, > Pavel Machek wrote: > > > > Hi! > > > > > > The following patch adds free_irq() and request_irq() to the suspend and > > > > resume, respectively, routines in the snd_intel8x0 driver. > > > > > > The patch looks OK to me although I have some concerns. > > > > > > - The error in resume can't be handled properly. > > > > > > What should we do for the error of request_irq()? > > > > > > - Adding this to all drivers seem too much. > > > > There's probably no other way. Talk to Len Brown. > > > > > We just need to stop the irq processing until resume, so something > > > like suspend_irq(irq, dev_id) and resume_irq(irq, dev_id) would be > > > more uesful? > > > > Its more complex than that. Irq numbers may change during resume. > > Hmm, then the patch looks wrong. It assumes that the irq number is > as same as before suspend. Well, that''s the theory, but frankly I don't see a practical reason. I have never seen this happening. Practically, for this to happen, you'll have to reconfigure the BIOS accross suspend/resume which is dangerous anyway. Greets, Rafael -- - Would you tell me, please, which way I ought to go from here? - That depends a good deal on where you want to get to. -- Lewis Carroll "Alice's Adventures in Wonderland" ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <200507281043.14697.rjw-KKrjLPT3xs0@public.gmane.org>]
* Re: Re: [Alsa-devel] [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (1/2) [not found] ` <200507281043.14697.rjw-KKrjLPT3xs0@public.gmane.org> @ 2005-07-28 8:48 ` Shaohua Li [not found] ` <1122540486.2903.8.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Shaohua Li @ 2005-07-28 8:48 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Takashi Iwai, Pavel Machek, LKML, ACPI mailing list, Andrew Morton, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw On Thu, 2005-07-28 at 10:43 +0200, Rafael J. Wysocki wrote: > Hi, > > On Thursday, 28 of July 2005 10:06, Takashi Iwai wrote: > > At Wed, 27 Jul 2005 22:52:49 +0200, > > Pavel Machek wrote: > > > > > > Hi! > > > > > > > > The following patch adds free_irq() and request_irq() to the suspend and > > > > > resume, respectively, routines in the snd_intel8x0 driver. > > > > > > > > The patch looks OK to me although I have some concerns. > > > > > > > > - The error in resume can't be handled properly. > > > > > > > > What should we do for the error of request_irq()? > > > > > > > > - Adding this to all drivers seem too much. > > > > > > There's probably no other way. Talk to Len Brown. > > > > > > > We just need to stop the irq processing until resume, so something > > > > like suspend_irq(irq, dev_id) and resume_irq(irq, dev_id) would be > > > > more uesful? > > > > > > Its more complex than that. Irq numbers may change during resume. > > > > Hmm, then the patch looks wrong. It assumes that the irq number is > > as same as before suspend. > > Well, that''s the theory, but frankly I don't see a practical reason. I have never > seen this happening. Practically, for this to happen, you'll have to reconfigure > the BIOS accross suspend/resume which is dangerous anyway. >From my understanding, we should not have such assumption. Say all device drivers with the same ioapic pin have freed irq. We might mask the ioapic pin and even free the vector. Then after you request_irq again, the interrupt might get different vector. If you enable MSI, then it's broken. In IA64, we already have such staff (mask ioapic pin and free vector). Thanks, Shaohua ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <1122540486.2903.8.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>]
* Re: Re: [Alsa-devel] [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (1/2) [not found] ` <1122540486.2903.8.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org> @ 2005-07-28 11:18 ` Rafael J. Wysocki 0 siblings, 0 replies; 15+ messages in thread From: Rafael J. Wysocki @ 2005-07-28 11:18 UTC (permalink / raw) To: Shaohua Li Cc: Takashi Iwai, Pavel Machek, LKML, ACPI mailing list, Andrew Morton, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw On Thursday, 28 of July 2005 10:48, Shaohua Li wrote: > On Thu, 2005-07-28 at 10:43 +0200, Rafael J. Wysocki wrote: > > Hi, > > > > On Thursday, 28 of July 2005 10:06, Takashi Iwai wrote: > > > At Wed, 27 Jul 2005 22:52:49 +0200, > > > Pavel Machek wrote: > > > > > > > > Hi! > > > > > > > > > > The following patch adds free_irq() and request_irq() to the suspend and > > > > > > resume, respectively, routines in the snd_intel8x0 driver. > > > > > > > > > > The patch looks OK to me although I have some concerns. > > > > > > > > > > - The error in resume can't be handled properly. > > > > > > > > > > What should we do for the error of request_irq()? > > > > > > > > > > - Adding this to all drivers seem too much. > > > > > > > > There's probably no other way. Talk to Len Brown. > > > > > > > > > We just need to stop the irq processing until resume, so something > > > > > like suspend_irq(irq, dev_id) and resume_irq(irq, dev_id) would be > > > > > more uesful? > > > > > > > > Its more complex than that. Irq numbers may change during resume. > > > > > > Hmm, then the patch looks wrong. It assumes that the irq number is > > > as same as before suspend. > > > > Well, that''s the theory, but frankly I don't see a practical reason. I have never > > seen this happening. Practically, for this to happen, you'll have to reconfigure > > the BIOS accross suspend/resume which is dangerous anyway. > From my understanding, we should not have such assumption. Say all > device drivers with the same ioapic pin have freed irq. We might mask > the ioapic pin and even free the vector. Then after you request_irq > again, the interrupt might get different vector. If you enable MSI, then > it's broken. > In IA64, we already have such staff (mask ioapic pin and free vector). All right then. Still the patch is urgently needed for some systems that do not have MSI and IMO the detection of the IRQ change can be implemented on top of it. Greets, Rafael -- - Would you tell me, please, which way I ought to go from here? - That depends a good deal on where you want to get to. -- Lewis Carroll "Alice's Adventures in Wonderland" ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (2/2) [not found] ` <200507261247.05684.rjw-KKrjLPT3xs0@public.gmane.org> 2005-07-26 10:51 ` [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (1/2) Rafael J. Wysocki @ 2005-07-26 10:54 ` Rafael J. Wysocki [not found] ` <200507261254.05507.rjw-KKrjLPT3xs0@public.gmane.org> 1 sibling, 1 reply; 15+ messages in thread From: Rafael J. Wysocki @ 2005-07-26 10:54 UTC (permalink / raw) To: LKML; +Cc: ACPI mailing list, Andrew Morton, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw The following patch adds basic suspend/resume support to the sk98lin network driver. Signed-off-by: Rafael J. Wysocki <rjw-KKrjLPT3xs0@public.gmane.org> --- linux-2.6.13-rc3-git5/drivers/net/sk98lin/skge.c 2005-07-23 19:26:29.000000000 +0200 +++ patched/drivers/net/sk98lin/skge.c 2005-07-25 18:17:57.000000000 +0200 @@ -5133,6 +5133,75 @@ static void __devexit skge_remove_one(st kfree(pAC); } +#ifdef CONFIG_PM +static int skge_suspend(struct pci_dev *pdev, pm_message_t state) +{ + struct net_device *dev = pci_get_drvdata(pdev); + DEV_NET *pNet = netdev_priv(dev); + SK_AC *pAC = pNet->pAC; + struct net_device *otherdev = pAC->dev[1]; + + if (pNet->Up) { + pAC->WasIfUp[0] = SK_TRUE; + DoPrintInterfaceChange = SK_FALSE; + SkDrvDeInitAdapter(pAC, 0); /* performs SkGeClose */ + } + if (otherdev != dev) { + pNet = netdev_priv(otherdev); + if (pNet->Up) { + pAC->WasIfUp[1] = SK_TRUE; + DoPrintInterfaceChange = SK_FALSE; + SkDrvDeInitAdapter(pAC, 1); /* performs SkGeClose */ + } + } + + pci_save_state(pdev); + pci_enable_wake(pdev, pci_choose_state(pdev, state), 0); + if (pAC->AllocFlag & SK_ALLOC_IRQ) { + free_irq(dev->irq, dev); + } + pci_disable_device(pdev); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); + + return 0; +} + +static int skge_resume(struct pci_dev *pdev) +{ + struct net_device *dev = pci_get_drvdata(pdev); + DEV_NET *pNet = netdev_priv(dev); + SK_AC *pAC = pNet->pAC; + int ret; + + pci_set_power_state(pdev, PCI_D0); + pci_restore_state(pdev); + pci_enable_device(pdev); + pci_set_master(pdev); + if (pAC->GIni.GIMacsFound == 2) + ret = request_irq(dev->irq, SkGeIsr, SA_SHIRQ, pAC->Name, dev); + else + ret = request_irq(dev->irq, SkGeIsrOnePort, SA_SHIRQ, pAC->Name, dev); + if (ret) { + printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", dev->irq); + pAC->AllocFlag &= ~SK_ALLOC_IRQ; + dev->irq = 0; + pci_disable_device(pdev); + return -EBUSY; + } + + if (pAC->WasIfUp[0] == SK_TRUE) { + DoPrintInterfaceChange = SK_FALSE; + SkDrvInitAdapter(pAC, 0); /* first device */ + } + if (pAC->dev[1] != dev && pAC->WasIfUp[1] == SK_TRUE) { + DoPrintInterfaceChange = SK_FALSE; + SkDrvInitAdapter(pAC, 1); /* second device */ + } + + return 0; +} +#endif + static struct pci_device_id skge_pci_tbl[] = { { PCI_VENDOR_ID_3COM, 0x1700, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, { PCI_VENDOR_ID_3COM, 0x80eb, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, @@ -5158,6 +5227,8 @@ static struct pci_driver skge_driver = { .id_table = skge_pci_tbl, .probe = skge_probe_one, .remove = __devexit_p(skge_remove_one), + .suspend = skge_suspend, + .resume = skge_resume, }; static int __init skge_init(void) ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <200507261254.05507.rjw-KKrjLPT3xs0@public.gmane.org>]
* Re: Re: [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (2/2) [not found] ` <200507261254.05507.rjw-KKrjLPT3xs0@public.gmane.org> @ 2005-07-26 12:25 ` Carl-Daniel Hailfinger [not found] ` <42E62BB0.6010409-hi6Y0CQ0nG0@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Carl-Daniel Hailfinger @ 2005-07-26 12:25 UTC (permalink / raw) To: Rafael J. Wysocki; +Cc: LKML, ACPI mailing list, Andrew Morton Rafael J. Wysocki schrieb: > The following patch adds basic suspend/resume support to the sk98lin > network driver. [snipped] The current in-kernel sk98lin driver is years behind the version downloadable from Syskonnect. Maybe it would make sense to update it first before applying any new patches. http://www.syskonnect.com/support/driver/d0102_driver.html Regards, Carl-Daniel -- http://www.hailfinger.org/ ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <42E62BB0.6010409-hi6Y0CQ0nG0@public.gmane.org>]
* Re: Re: [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (2/2) [not found] ` <42E62BB0.6010409-hi6Y0CQ0nG0@public.gmane.org> @ 2005-07-26 21:02 ` Rafael J. Wysocki [not found] ` <200507262302.37488.rjw-KKrjLPT3xs0@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Rafael J. Wysocki @ 2005-07-26 21:02 UTC (permalink / raw) To: Carl-Daniel Hailfinger; +Cc: LKML, ACPI mailing list, Andrew Morton On Tuesday, 26 of July 2005 14:25, Carl-Daniel Hailfinger wrote: > Rafael J. Wysocki schrieb: > > The following patch adds basic suspend/resume support to the sk98lin > > network driver. > [snipped] > > The current in-kernel sk98lin driver is years behind the version > downloadable from Syskonnect. Maybe it would make sense to update > it first before applying any new patches. > http://www.syskonnect.com/support/driver/d0102_driver.html You are right, but I don't know who should do this. I have only submitted the patch to eliminate a problem with the current kernel. Greets, Rafael -- - Would you tell me, please, which way I ought to go from here? - That depends a good deal on where you want to get to. -- Lewis Carroll "Alice's Adventures in Wonderland" ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <200507262302.37488.rjw-KKrjLPT3xs0@public.gmane.org>]
* Re: Re: [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (2/2) [not found] ` <200507262302.37488.rjw-KKrjLPT3xs0@public.gmane.org> @ 2005-07-26 21:11 ` Peter Buckingham [not found] ` <42E6A6E7.5000402-1HAy0Et5u51Wk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Peter Buckingham @ 2005-07-26 21:11 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Carl-Daniel Hailfinger, LKML, ACPI mailing list, Andrew Morton Rafael J. Wysocki wrote: > On Tuesday, 26 of July 2005 14:25, Carl-Daniel Hailfinger wrote: >>The current in-kernel sk98lin driver is years behind the version >>downloadable from Syskonnect. Maybe it would make sense to update >>it first before applying any new patches. >>http://www.syskonnect.com/support/driver/d0102_driver.html > > > You are right, but I don't know who should do this. I have only submitted > the patch to eliminate a problem with the current kernel. have a look at the skge driver, this is a cleaned up version of the sk98lin. Although it doesn't support all of the devices, ie ones based on the Yukon 2. peter ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <42E6A6E7.5000402-1HAy0Et5u51Wk0Htik3J/w@public.gmane.org>]
* Re: Re: [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (2/2) [not found] ` <42E6A6E7.5000402-1HAy0Et5u51Wk0Htik3J/w@public.gmane.org> @ 2005-07-26 21:37 ` Rafael J. Wysocki 0 siblings, 0 replies; 15+ messages in thread From: Rafael J. Wysocki @ 2005-07-26 21:37 UTC (permalink / raw) To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Cc: Peter Buckingham, Carl-Daniel Hailfinger, LKML, Andrew Morton On Tuesday, 26 of July 2005 23:11, Peter Buckingham wrote: > Rafael J. Wysocki wrote: > > On Tuesday, 26 of July 2005 14:25, Carl-Daniel Hailfinger wrote: > >>The current in-kernel sk98lin driver is years behind the version > >>downloadable from Syskonnect. Maybe it would make sense to update > >>it first before applying any new patches. > >>http://www.syskonnect.com/support/driver/d0102_driver.html > > > > > > You are right, but I don't know who should do this. I have only submitted > > the patch to eliminate a problem with the current kernel. > > have a look at the skge driver, this is a cleaned up version of the > sk98lin. Although it doesn't support all of the devices, ie ones based > on the Yukon 2. Thanks for the hint, I will. From the first look it's missing the free_irq()/request_irq() on suspend/resume however. Greets, Rafael -- - Would you tell me, please, which way I ought to go from here? - That depends a good deal on where you want to get to. -- Lewis Carroll "Alice's Adventures in Wonderland" ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2005-07-28 11:18 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-26 10:47 [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (0/2) Rafael J. Wysocki
[not found] ` <200507261247.05684.rjw-KKrjLPT3xs0@public.gmane.org>
2005-07-26 10:51 ` [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (1/2) Rafael J. Wysocki
[not found] ` <200507261251.48291.rjw-KKrjLPT3xs0@public.gmane.org>
2005-07-27 8:53 ` [Alsa-devel] " Takashi Iwai
2005-07-27 20:52 ` [ACPI] " Pavel Machek
[not found] ` <20050727205249.GA708-u08AdweFZfgxtPtxi4kahqVXKuFTiq87@public.gmane.org>
2005-07-28 8:06 ` Re: [Alsa-devel] " Takashi Iwai
[not found] ` <s5hr7djtkvo.wl%tiwai-l3A5Bk7waGM@public.gmane.org>
2005-07-28 8:31 ` Pavel Machek
2005-07-28 8:37 ` [ACPI] " Shaohua Li
2005-07-28 8:43 ` Rafael J. Wysocki
[not found] ` <200507281043.14697.rjw-KKrjLPT3xs0@public.gmane.org>
2005-07-28 8:48 ` Re: [Alsa-devel] " Shaohua Li
[not found] ` <1122540486.2903.8.camel-ECwVeV2eNyQD0+JXs3kMbRL4W9x8LtSr@public.gmane.org>
2005-07-28 11:18 ` Rafael J. Wysocki
2005-07-26 10:54 ` [PATCH] 2.6.13-rc3-git5: fix Bug #4416 (2/2) Rafael J. Wysocki
[not found] ` <200507261254.05507.rjw-KKrjLPT3xs0@public.gmane.org>
2005-07-26 12:25 ` Carl-Daniel Hailfinger
[not found] ` <42E62BB0.6010409-hi6Y0CQ0nG0@public.gmane.org>
2005-07-26 21:02 ` Rafael J. Wysocki
[not found] ` <200507262302.37488.rjw-KKrjLPT3xs0@public.gmane.org>
2005-07-26 21:11 ` Peter Buckingham
[not found] ` <42E6A6E7.5000402-1HAy0Et5u51Wk0Htik3J/w@public.gmane.org>
2005-07-26 21:37 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox