Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: New orinoco driver release, 0.15rc1: msg#00034

Subject: Re: New orinoco driver release, 0.15rc1
On Mon, Apr 19, 2004 at 03:28:55PM +1000, David Gibson wrote:
> I've at least made a long overdue release of the driver.  I hope this
> can get some more exposure and then be an even-more-overdue merge to
> Linus.

> Many thanks to Pavel Roskin who has done the vast majority of the work
> on this release, fixing many bugs and merging many features.

Please include this patch which I posted to -users a while back to
properly support PCI suspend and resume.  With it my laptop resumes fine
and has networking; without it I have to remove the module and reinsert
it.

I just stole it out of 8139too.c really having read
Documentation/power/pci.txt from a kernel tree.

I've updated this for 0.15

diff -ur orinoco-0.15rc1/orinoco.h orinoco-0.15rc1.suspend/orinoco.h
--- orinoco-0.15rc1/orinoco.h   2004-04-19 08:58:58.000000000 +0100
+++ orinoco-0.15rc1.suspend/orinoco.h   2004-04-19 08:56:33.000000000 +0100
@@ -99,6 +99,9 @@
        int port_type, createibss;
        int promiscuous, mc_count;
 
+       /* PCI suspend/resume state */
+       u32 pci_state[16];
+
        /* Scanning support */
        int     scan_inprogress;        /* Scan pending... */
        u32     scan_mode;              /* Type of scan done */
diff -ur orinoco-0.15rc1/orinoco_pci.c orinoco-0.15rc1.suspend/orinoco_pci.c
--- orinoco-0.15rc1/orinoco_pci.c       2004-04-19 08:58:58.000000000 +0100
+++ orinoco-0.15rc1.suspend/orinoco_pci.c       2004-04-19 08:57:57.000000000 
+0100
@@ -322,6 +322,9 @@
        
        orinoco_unlock(priv, &flags);
 
+       pci_set_power_state(pdev, 3);
+       pci_save_state(pdev, priv->pci_state);
+
        return 0;
 }
 
@@ -334,6 +337,9 @@
 
        printk(KERN_DEBUG "%s: Orinoco-PCI waking up\n", dev->name);
 
+       pci_restore_state(pdev, priv->pci_state);
+       pci_set_power_state(pdev, 0);
+
        err = orinoco_reinit_firmware(dev);
        if (err) {
                printk(KERN_ERR "%s: Error %d re-initializing firmware on 
orinoco_pci_resume()\n",

Simon.

-- 
        Black Cat Networks        -(  "And what have they ever given us  )-
UK domain, email and web hosting  -(    in return?"   "The aqueduct?"    )-
http://www.blackcatnetworks.co.uk -(                                     )-


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click


<Prev in Thread] Current Thread [Next in Thread>