public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI Update for 2.6.3-rc1
Date: Mon, 9 Feb 2004 15:22:16 -0800	[thread overview]
Message-ID: <10763689362321@kroah.com> (raw)
In-Reply-To: <10763689351999@kroah.com>

ChangeSet 1.1500.11.2, 2004/01/30 16:34:48-08:00, ambx1@neo.rr.com

[PATCH] PCI: Remove uneeded resource structures from pci_dev

The following patch remove irq_resource and dma_resource from pci_dev.  It
appears that the serial pci driver depends on irq_resource, however, it may be
broken portions of an old quirk.  I attempted to maintain the existing behavior
while removing irq_resource.  I changed FL_IRQRESOURCE to FL_NOIRQ.  Russell,
could you provide any comments?  irq_resource and dma_resource are most likely
remnants from when pci_dev was shared with pnp.


 drivers/serial/8250_pci.c |   27 ++++++---------------------
 include/linux/pci.h       |    2 --
 2 files changed, 6 insertions(+), 23 deletions(-)


diff -Nru a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
--- a/drivers/serial/8250_pci.c	Mon Feb  9 14:59:44 2004
+++ b/drivers/serial/8250_pci.c	Mon Feb  9 14:59:44 2004
@@ -43,20 +43,12 @@
 #define FL_BASE4		0x0004
 #define FL_GET_BASE(x)		(x & FL_BASE_MASK)
 
-#define FL_IRQ_MASK		(0x0007 << 4)
-#define FL_IRQBASE0		(0x0000 << 4)
-#define FL_IRQBASE1		(0x0001 << 4)
-#define FL_IRQBASE2		(0x0002 << 4)
-#define FL_IRQBASE3		(0x0003 << 4)
-#define FL_IRQBASE4		(0x0004 << 4)
-#define FL_GET_IRQBASE(x)	((x & FL_IRQ_MASK) >> 4)
-
 /* Use successive BARs (PCI base address registers),
    else use offset into some specified BAR */
 #define FL_BASE_BARS		0x0008
 
-/* Use the irq resource table instead of dev->irq */
-#define FL_IRQRESOURCE		0x0080
+/* do not assign an irq */
+#define FL_NOIRQ		0x0080
 
 /* Use the Base address register size to cap number of ports */
 #define FL_REGION_SZ_CAP	0x0100
@@ -850,17 +842,10 @@
 static _INLINE_ int
 get_pci_irq(struct pci_dev *dev, struct pci_board *board, int idx)
 {
-	int base_idx;
-
-	if ((board->flags & FL_IRQRESOURCE) == 0)
-		return dev->irq;
-
-	base_idx = FL_GET_IRQBASE(board->flags);
-
-	if (base_idx > DEVICE_COUNT_IRQ)
+	if (board->flags & FL_NOIRQ)
 		return 0;
-	
-	return dev->irq_resource[base_idx].start;
+	else
+		return dev->irq;
 }
 
 /*
@@ -1314,7 +1299,7 @@
 		.first_offset	= 0x10000,
 	},
 	[pbn_sgi_ioc3] = {
-		.flags		= FL_BASE0|FL_IRQRESOURCE,
+		.flags		= FL_BASE0|FL_NOIRQ,
 		.num_ports	= 1,
 		.base_baud	= 458333,
 		.uart_offset	= 8,
diff -Nru a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h	Mon Feb  9 14:59:44 2004
+++ b/include/linux/pci.h	Mon Feb  9 14:59:44 2004
@@ -416,8 +416,6 @@
 	 */
 	unsigned int	irq;
 	struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
-	struct resource dma_resource[DEVICE_COUNT_DMA];
-	struct resource irq_resource[DEVICE_COUNT_IRQ];
 
 	char *		slot_name;	/* pointer to dev.bus_id */
 


  reply	other threads:[~2004-02-09 23:58 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-09 23:13 [BK PATCH] PCI update for 2.6.3-rc1 Greg KH
2004-02-09 23:22 ` [PATCH] PCI Update " Greg KH
2004-02-09 23:22   ` Greg KH [this message]
2004-02-09 23:22     ` Greg KH
2004-02-09 23:22       ` Greg KH
2004-02-09 23:22         ` Greg KH
2004-02-09 23:22           ` Greg KH
2004-02-09 23:22             ` Greg KH
2004-02-09 23:22               ` Greg KH
2004-02-09 23:22                 ` Greg KH
2004-02-09 23:22                   ` Greg KH
2004-02-09 23:22                     ` Greg KH
2004-02-09 23:22                       ` Greg KH
2004-02-09 23:22                         ` Greg KH
2004-02-09 23:22                           ` Greg KH
2004-02-09 23:22                             ` Greg KH
2004-02-09 23:22                               ` Greg KH
2004-02-09 23:22                                 ` Greg KH
2004-02-09 23:22                                   ` Greg KH
2004-02-09 23:22                                     ` Greg KH
2004-02-09 23:22                                       ` Greg KH
2004-02-09 23:22                                         ` Greg KH
2004-02-09 23:22                                           ` Greg KH
2004-02-09 23:22                                             ` Greg KH
2004-02-10 11:11                                               ` Marcelo Tosatti
2004-02-10 16:03     ` Geert Uytterhoeven
2004-02-10 16:46       ` Greg KH
2004-02-10 17:03         ` Kai Germaschewski
2004-02-10 17:49         ` Karsten Keil
2004-02-11 22:27           ` Adrian Bunk
2004-02-10 18:05         ` Adam Belay
2004-02-18 19:40           ` Greg KH

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=10763689362321@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /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