missing pci_enable_device

missing pci_enable_device

Post by <da.. » Wed, 14 Mar 2001 11:00:04



pcnet32 is still touching resources before enabling.
Patch below should apply to ac19.

regards

Dave.

--
| Dave Jones.        http://www.suse.de/~davej
| SuSE Labs

diff -urN --exclude-from=/home/davej/.exclude linux/drivers/net/pcnet32.c linux-dj/drivers/net/pcnet32.c
--- linux/drivers/net/pcnet32.c Fri Mar  9 03:29:08 2001

     printk(KERN_INFO "pcnet32_probe_pci: found device %#08x.%#08x\n", ent->vendor, ent->device);

+    if ((err = pci_enable_device(pdev)) < 0) {
+       printk(KERN_ERR "pcnet32.c: failed to enable device -- err=%d\n", err);
+       return err;
+    }
+    pci_set_master(pdev);
+
     ioaddr = pci_resource_start (pdev, 0);
     printk(KERN_INFO "    ioaddr=%#08lx  resource_flags=%#08lx\n", ioaddr, pci_resource_flags (pdev, 0));

        return -ENODEV;
     }

-    if ((err = pci_enable_device(pdev)) < 0) {
-       printk(KERN_ERR "pcnet32.c: failed to enable device -- err=%d\n", err);
-       return err;
-    }
-
-    pci_set_master(pdev);
-
     return pcnet32_probe1(ioaddr, pdev->irq, 1, card_idx, pdev);
 }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. fix for pci_enable_device in 2.4.19ac3

I found my tulip driver was complaining about not being able to enable
the device.  Turns out this was the problem:


 int
 pci_enable_device(struct pci_dev *dev)
 {
-       pci_enable_device_bars(dev, 0x3F);
+       return pci_enable_device_bars(dev, 0x3F);
 }

 /**

I guess nobody else checks their error returns (or it just happened to
always return 0).

        J

[ sorry about the resend; forgot to turn off HTML ]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Change the value of ARG_MAX

3. pci_enable_device reports IRQ routing conflict

4. Software Distribution Tools

5. misplaced pci_enable_device()s in drivers/sound/

6. Error message with network card

7. pci_enable_device fixes/additions

8. Help me with creating an index file for packages

9. starfire reads irq before pci_enable_device.

10. PATCH: pci_enable_device fixes for sound/* and block/cpqarray and block/cciss

11. Missing software ... find what I'm missing

12. libpng.so.3 - missing library file missing

13. Missing Librarys / sendmail is missing libgdbm.so.2