mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Ralf Gerbig <rge@hsp-law.de>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Ralf Gerbig <rge-news@quengel.org>,
	linux-dvb-maintainer@linuxtv.org, Andrew Morton <akpm@osdl.org>
Subject: Re: ACPI interrupt routing
Date: Tue, 24 Aug 2004 10:47:54 -0600	[thread overview]
Message-ID: <200408241047.54796.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <m0isb9ispy.fsf@test3.hsp-law.de>

On Monday 23 August 2004 1:01 pm, Ralf Gerbig wrote:
> ACPI: PCI interrupt 0000:01:06.1[A] -> GSI 18 (level, high) -> IRQ 18
> bt878(0): Bt878 (rev 17) at 01:06.1, irq: 10, <====================================

Can you try this patch, please?  The bt878 driver has the classic problem
of looking at pci_dev->irq before pci_enable_device().


Call pci_enable_device() before looking at pci_dev.  Also, call
pci_disable_device() when releasing the device.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

===== drivers/media/dvb/bt8xx/bt878.c 1.2 vs edited =====
--- 1.2/drivers/media/dvb/bt8xx/bt878.c	2003-12-30 01:40:50 -07:00
+++ edited/drivers/media/dvb/bt8xx/bt878.c	2004-08-24 10:42:54 -06:00
@@ -417,6 +417,8 @@
 
 	printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n",
 	       bt878_num);
+	if (pci_enable_device(dev))
+		return -EIO;
 
 	bt = &bt878[bt878_num];
 	bt->dev = dev;
@@ -426,11 +428,10 @@
 	bt->id = dev->device;
 	bt->irq = dev->irq;
 	bt->bt878_adr = pci_resource_start(dev, 0);
-	if (pci_enable_device(dev))
-		return -EIO;
 	if (!request_mem_region(pci_resource_start(dev, 0),
 				pci_resource_len(dev, 0), "bt878")) {
-		return -EBUSY;
+		result = -EBUSY;
+		goto fail0;
 	}
 
 	pci_read_config_byte(dev, PCI_CLASS_REVISION, &bt->revision);
@@ -501,6 +502,8 @@
       fail1:
 	release_mem_region(pci_resource_start(bt->dev, 0),
 			   pci_resource_len(bt->dev, 0));
+      fail0:
+	pci_disable_device(dev);
 	return result;
 }
 
@@ -540,6 +543,7 @@
 	bt878_mem_free(bt);
 
 	pci_set_drvdata(pci_dev, NULL);
+	pci_disable_device(pci_dev);
 	return;
 }
 

  reply	other threads:[~2004-08-24 16:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-23 19:01 Ralf Gerbig
2004-08-24 16:47 ` Bjorn Helgaas [this message]
2004-08-24 18:15   ` Ralf Gerbig

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=200408241047.54796.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=akpm@osdl.org \
    --cc=linux-dvb-maintainer@linuxtv.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rge-news@quengel.org \
    --cc=rge@hsp-law.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®