lkml.org 
[lkml]   [2000]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: test12-pre6
On Wed, Dec 06, 2000, Miles Lane <miles@megapathdsl.net> wrote:
> Hmm. Your patch doesn't test whether pci_enable_device(dev)
> was successful, does it?

Umm, it does. If pci_enable_device wasn't successful, it returns -ENODEV.

Your patch below calls pci_set_master if enabling the device fails and
then ignores the device.

Is that what you meant?

JE

> I think what you want is:
>
> diff -u --new-file drivers/usb/uhci.c~ drivers/usb/uhci.c
> --- drivers/usb/uhci.c~ Tue Dec 5 23:55:38 2000
> +++ drivers/usb/uhci.c Wed Dec 6 14:50:00 2000
> @@ -2380,8 +2380,10 @@
> /* disable legacy emulation */
> pci_write_config_word(dev, USBLEGSUP, 0);
>
> -
> if (pci_enable_device(dev) < 0)
> +
> if (pci_enable_device(dev) < 0) {
> +
> pci_set_master(dev);
> return -ENODEV;
> +
> }
>
> if (!dev->irq) {
> err("found UHCI device with no IRQ assigned. check BIOS settings!");
> diff -u --new-file drivers/usb/usb-uhci.c~ drivers/usb/usb-uhci.c
> --- drivers/usb/usb-uhci.c~ Tue Dec 5 23:55:38 2000
> +++ drivers/usb/usb-uhci.c Wed Dec 6 14:50:09 2000
> @@ -2939,8 +2939,10 @@
> {
> int i;
>
> -
> if (pci_enable_device(dev) < 0)
> +
> if (pci_enable_device(dev) < 0) {
> +
> pci_set_master(dev);
> return -ENODEV;
> +
> }
>
> /* Search for the IO base address.. */
> for (i = 0; i < 6; i++) {
> diff -u --new-file drivers/usb/usb-ohci.c# drivers/usb/usb-ohci.c
> --- drivers/usb/usb-ohci.c# Wed Dec 6 14:56:12 2000
> +++ drivers/usb/usb-ohci.c Wed Dec 6 14:49:34 2000
> @@ -2320,8 +2320,10 @@
> unsigned long mem_resource, mem_len;
> void *mem_base;
>
> -
> if (pci_enable_device(dev) < 0)
> +
> if (pci_enable_device(dev) < 0) {
> +
> pci_set_master(dev);
> return -ENODEV;
> +
> }
>
> /* we read its hardware registers as memory */
> mem_resource = pci_resource_start(dev, 0);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:51    [W:3.268 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site