All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Erdfelt <jerdfelt@valinux.com>
To: Miles Lane <miles@megapathdsl.net>
Cc: Jeff Garzik <jgarzik@mandrakesoft.com>,
	Erik Mouw <J.A.K.Mouw@ITS.TUDelft.NL>,
	Linus Torvalds <torvalds@transmeta.com>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>,
	usb@in.tum.de
Subject: Re: test12-pre6
Date: Wed, 6 Dec 2000 15:10:06 -0800	[thread overview]
Message-ID: <20001206151006.S1318@valinux.com> (raw)
In-Reply-To: <20001206200803.C847@arthur.ubicom.tudelft.nl> <Pine.LNX.4.10.10012061131320.1873-100000@penguin.transmeta.com> <20001206210928.G847@arthur.ubicom.tudelft.nl> <3A2EAA62.1DB6FCCC@mandrakesoft.com> <3A2EC472.40900@megapathdsl.net>
In-Reply-To: <3A2EC472.40900@megapathdsl.net>; from miles@megapathdsl.net on Wed, Dec 06, 2000 at 02:57:54PM -0800

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/

  reply	other threads:[~2000-12-06 23:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-06  7:25 test12-pre6 Linus Torvalds
2000-12-06  7:50 ` test12-pre6 Alexander Viro
2000-12-06  7:54 ` [PATCH] test12-pre6 Alexander Viro
2000-12-06  8:03 ` Alexander Viro
2000-12-06  8:06 ` Alexander Viro
2000-12-06  8:26   ` Tigran Aivazian
2000-12-06  8:38     ` Tigran Aivazian
2000-12-06  8:56       ` Tigran Aivazian
2000-12-06  9:07         ` Alexander Viro
2000-12-06  9:29           ` Tigran Aivazian
2000-12-06  8:11 ` Alexander Viro
2000-12-06 11:47 ` test12-pre6 Wakko Warner
2000-12-06 12:04   ` test12-pre6 Andrew Morton
2000-12-07  1:43     ` test12-pre6 Wakko Warner
2000-12-06 13:06 ` test12-pre6 Tobias Ringstrom
2000-12-06 13:29   ` test12-pre6 Miles Lane
2000-12-06 18:08 ` test12-pre6 Erik Mouw
2000-12-06 18:38   ` test12-pre6 Linus Torvalds
2000-12-06 19:08     ` test12-pre6 Erik Mouw
2000-12-06 19:38       ` test12-pre6 Linus Torvalds
2000-12-06 20:09         ` test12-pre6 Erik Mouw
2000-12-06 21:06           ` test12-pre6 Jeff Garzik
2000-12-06 22:57             ` test12-pre6 Miles Lane
2000-12-06 23:10               ` Johannes Erdfelt [this message]
2000-12-06 23:13               ` test12-pre6 Jeff Garzik
2000-12-06 23:17                 ` test12-pre6 Miles Lane
2000-12-07  0:05           ` test12-pre6 Miles Lane
  -- strict thread matches above, loose matches on Subject: below --
2000-12-07  1:30 test12-pre6 Dunlap, Randy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001206151006.S1318@valinux.com \
    --to=jerdfelt@valinux.com \
    --cc=J.A.K.Mouw@ITS.TUDelft.NL \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miles@megapathdsl.net \
    --cc=torvalds@transmeta.com \
    --cc=usb@in.tum.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.