[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ACPI problem: console and X black after resume on supsend-to-ram



On Thu, 2005-01-06 at 16:19 +0100, Kai Hildebrandt wrote:
> Hi again.
> 
> On Fri, 07 Jan 2005 01:11:57 +1300
> Andrew McMillan <andrew@catalyst.net.nz> wrote:
> 
> > I'm currently running 2.6.10, without any patches.  The configuration
> > I have is for the new radeon driver.  I built my kernel using the
> > make-kpkg utility from the kernel-package package, so I can make the
> > actual kernel available for download (and the package will include
> > the .config, of course).  I also have madwifi packages to go along
> > with that.
> > 
> madwifi does not seem to work with 2.6.10:

Yeah, there's a patch (attached) for that, which I have applied here,
and it works fine for me.


> > > > My only disappointment is that the ATI FireGL T2 drivers do not
> > > > handle suspend / resume, making them effectively useless.
> > > > 
> > > Which drivers? fgrlx from ATI?
> > 
> > Yes, those ones.  Unfortunately they suck, for laptops, since the
> > fglrx drivers do not support suspend / resume :-(
> > 
> > For X I just use the XFree86 ones (ati) and put up with unaccelerated
> > video, since suspend resume is _much_ more important to me.
> > 
> I don't need the GLX stuff.
> 
> But I really *want*' suspend-to-whatever. :-(

Indeed.  While we have been passing these e-mails back and forth I have
spent most of the week visiting Singapore... but no reboot yet :-)

Regards,
					Andrew McMillan.

-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ  Ltd,  PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/            PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201      MOB: +64(272)DEBIAN      OFFICE: +64(4)499-2267
It is truth which you cannot contradict; you can without any difficulty
                      contradict Socrates. - Plato
-------------------------------------------------------------------------

diff -Naur madwifi-orig/ath/if_ath_pci.c madwifi-patched/ath/if_ath_pci.c
--- madwifi-orig/ath/if_ath_pci.c	2004-11-15 04:53:27.000000000 +0100
+++ madwifi-patched/ath/if_ath_pci.c	2004-12-27 20:20:26.000000000 +0100
@@ -69,9 +69,11 @@
 
 struct ath_pci_softc {
 	struct ath_softc	aps_sc;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
 #ifdef CONFIG_PM
 	u32			aps_pmstate[16];
 #endif
+#endif
 };
 
 /*
@@ -239,10 +241,16 @@
 ath_pci_suspend(struct pci_dev *pdev, u32 state)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
 	struct ath_pci_softc *sc = dev->priv;
+#endif
 
 	ath_suspend(dev);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
 	pci_save_state(pdev, sc->aps_pmstate);
+#else
+	pci_save_state(pdev);
+#endif
 	pci_disable_device(pdev);
 	pci_set_power_state(pdev, 3);
 
@@ -253,11 +261,17 @@
 ath_pci_resume(struct pci_dev *pdev)
 {
 	struct net_device *dev = pci_get_drvdata(pdev);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
 	struct ath_pci_softc *sc = dev->priv;
+#endif
 	u32 val;
 
 	pci_enable_device(pdev);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
 	pci_restore_state(pdev, sc->aps_pmstate);
+#else
+	pci_restore_state(pdev);
+#endif
 	/*
 	 * Suspend/Resume resets the PCI configuration space, so we have to
 	 * re-disable the RETRY_TIMEOUT register (0x41) to keep
@@ -328,11 +342,16 @@
 {
 	printk(KERN_INFO "%s: %s\n", dev_info, version);
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10))
 	if (pci_register_driver(&ath_pci_drv_id) <= 0) {
+#else
+	if (pci_module_init(&ath_pci_drv_id) < 0) {
+#endif
 		printk("ath_pci: No devices found, driver not installed.\n");
 		pci_unregister_driver(&ath_pci_drv_id);
 		return (-ENODEV);
 	}
+
 #ifdef CONFIG_SYSCTL
 	ath_sysctl_register();
 #endif
diff -Naur madwifi-orig/ath/if_ath_pci.h madwifi-patched/ath/if_ath_pci.h
--- madwifi-orig/ath/if_ath_pci.h	2004-08-20 23:30:29.000000000 +0200
+++ madwifi-patched/ath/if_ath_pci.h	2004-12-27 21:30:50.000000000 +0100
@@ -43,7 +43,11 @@
 #include <linux/pci.h>

 #define bus_map_single        pci_map_single
 #define bus_unmap_single      pci_unmap_single
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
 #define bus_dma_sync_single   pci_dma_sync_single
+#else
+#define bus_dma_sync_single   pci_dma_sync_single_for_cpu
+#endif
 #define bus_alloc_consistent  pci_alloc_consistent
 #define bus_free_consistent   pci_free_consistent
 #define BUS_DMA_FROMDEVICE    PCI_DMA_FROMDEVICE

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: