Commit 814b1604 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge kroah.com:/home/linux/linux/BK/bleeding-2.5

into kroah.com:/home/linux/linux/BK/pci-2.5
parents 36a04267 7e6eed16
...@@ -278,8 +278,6 @@ sct_alloc_io(u_int adr, u_int len) ...@@ -278,8 +278,6 @@ sct_alloc_io(u_int adr, u_int len)
static struct pci_dev *dev_a8 __initdata = NULL; static struct pci_dev *dev_a8 __initdata = NULL;
static u16 sub_vendor_id __initdata = 0; static u16 sub_vendor_id __initdata = 0;
static u16 sub_sys_id __initdata = 0; static u16 sub_sys_id __initdata = 0;
static u_char pci_bus __initdata = 0;
static u_char pci_device_fn __initdata = 0;
static u_char pci_irq __initdata = 0; static u_char pci_irq __initdata = 0;
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
...@@ -328,8 +326,6 @@ setup_sct_quadro(struct IsdnCard *card) ...@@ -328,8 +326,6 @@ setup_sct_quadro(struct IsdnCard *card)
return(0); return(0);
pci_ioaddr1 = pci_resource_start(dev_a8, 1); pci_ioaddr1 = pci_resource_start(dev_a8, 1);
pci_irq = dev_a8->irq; pci_irq = dev_a8->irq;
pci_bus = dev_a8->bus->number;
pci_device_fn = dev_a8->devfn;
found = 1; found = 1;
break; break;
} }
...@@ -342,20 +338,17 @@ setup_sct_quadro(struct IsdnCard *card) ...@@ -342,20 +338,17 @@ setup_sct_quadro(struct IsdnCard *card)
} }
#ifdef ATTEMPT_PCI_REMAPPING #ifdef ATTEMPT_PCI_REMAPPING
/* HACK: PLX revision 1 bug: PLX address bit 7 must not be set */ /* HACK: PLX revision 1 bug: PLX address bit 7 must not be set */
pcibios_read_config_byte(pci_bus, pci_device_fn, pci_read_config_byte(dev_a8, PCI_REVISION_ID, &pci_rev_id);
PCI_REVISION_ID, &pci_rev_id);
if ((pci_ioaddr1 & 0x80) && (pci_rev_id == 1)) { if ((pci_ioaddr1 & 0x80) && (pci_rev_id == 1)) {
printk(KERN_WARNING "HiSax: %s (%s): PLX rev 1, remapping required!\n", printk(KERN_WARNING "HiSax: %s (%s): PLX rev 1, remapping required!\n",
CardType[card->typ], CardType[card->typ],
sct_quadro_subtypes[cs->subtyp]); sct_quadro_subtypes[cs->subtyp]);
/* Restart PCI negotiation */ /* Restart PCI negotiation */
pcibios_write_config_dword(pci_bus, pci_device_fn, pci_write_config_dword(dev_a8, PCI_BASE_ADDRESS_1, (u_int) - 1);
PCI_BASE_ADDRESS_1, (u_int) - 1);
/* Move up by 0x80 byte */ /* Move up by 0x80 byte */
pci_ioaddr1 += 0x80; pci_ioaddr1 += 0x80;
pci_ioaddr1 &= PCI_BASE_ADDRESS_IO_MASK; pci_ioaddr1 &= PCI_BASE_ADDRESS_IO_MASK;
pcibios_write_config_dword(pci_bus, pci_device_fn, pci_write_config_dword(dev_a8, PCI_BASE_ADDRESS_1, pci_ioaddr1);
PCI_BASE_ADDRESS_1, pci_ioaddr1);
dev_a8->resource[ 1].start = pci_ioaddr1; dev_a8->resource[ 1].start = pci_ioaddr1;
} }
#endif /* End HACK */ #endif /* End HACK */
...@@ -366,11 +359,11 @@ setup_sct_quadro(struct IsdnCard *card) ...@@ -366,11 +359,11 @@ setup_sct_quadro(struct IsdnCard *card)
sct_quadro_subtypes[cs->subtyp]); sct_quadro_subtypes[cs->subtyp]);
return (0); return (0);
} }
pcibios_read_config_dword(pci_bus, pci_device_fn, PCI_BASE_ADDRESS_1, &pci_ioaddr1); pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_1, &pci_ioaddr1);
pcibios_read_config_dword(pci_bus, pci_device_fn, PCI_BASE_ADDRESS_2, &pci_ioaddr2); pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_2, &pci_ioaddr2);
pcibios_read_config_dword(pci_bus, pci_device_fn, PCI_BASE_ADDRESS_3, &pci_ioaddr3); pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_3, &pci_ioaddr3);
pcibios_read_config_dword(pci_bus, pci_device_fn, PCI_BASE_ADDRESS_4, &pci_ioaddr4); pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_4, &pci_ioaddr4);
pcibios_read_config_dword(pci_bus, pci_device_fn, PCI_BASE_ADDRESS_5, &pci_ioaddr5); pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_5, &pci_ioaddr5);
if (!pci_ioaddr1 || !pci_ioaddr2 || !pci_ioaddr3 || !pci_ioaddr4 || !pci_ioaddr5) { if (!pci_ioaddr1 || !pci_ioaddr2 || !pci_ioaddr3 || !pci_ioaddr4 || !pci_ioaddr5) {
printk(KERN_WARNING "HiSax: %s (%s): No IO base address(es)\n", printk(KERN_WARNING "HiSax: %s (%s): No IO base address(es)\n",
CardType[card->typ], CardType[card->typ],
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
# #
export-objs := access.o hotplug.o pci-driver.o pci.o pool.o \ export-objs := access.o hotplug.o pci-driver.o pci.o pool.o \
probe.o proc.o search.o compat.o setup-bus.o probe.o proc.o search.o setup-bus.o
obj-y += access.o probe.o pci.o pool.o quirks.o \ obj-y += access.o probe.o pci.o pool.o quirks.o \
compat.o names.o pci-driver.o search.o hotplug.o names.o pci-driver.o search.o hotplug.o
obj-$(CONFIG_PM) += power.o obj-$(CONFIG_PM) += power.o
obj-$(CONFIG_PROC_FS) += proc.o obj-$(CONFIG_PROC_FS) += proc.o
......
/*
* $Id: compat.c,v 1.1 1998/02/16 10:35:50 mj Exp $
*
* PCI Bus Services -- Function For Backward Compatibility
*
* Copyright 1998--2000 Martin Mares <mj@ucw.cz>
*/
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
/* Obsolete functions, these will be going away... */
#define PCI_OP(rw,size,type) \
int pcibios_##rw##_config_##size (unsigned char bus, unsigned char dev_fn, \
unsigned char where, unsigned type val) \
{ \
struct pci_dev *dev = pci_find_slot(bus, dev_fn); \
if (!dev) return PCIBIOS_DEVICE_NOT_FOUND; \
return pci_##rw##_config_##size(dev, where, val); \
}
PCI_OP(read, byte, char *)
PCI_OP(read, word, short *)
PCI_OP(read, dword, int *)
PCI_OP(write, byte, char)
PCI_OP(write, word, short)
PCI_OP(write, dword, int)
EXPORT_SYMBOL(pcibios_read_config_byte);
EXPORT_SYMBOL(pcibios_read_config_word);
EXPORT_SYMBOL(pcibios_read_config_dword);
EXPORT_SYMBOL(pcibios_write_config_byte);
EXPORT_SYMBOL(pcibios_write_config_word);
EXPORT_SYMBOL(pcibios_write_config_dword);
...@@ -430,7 +430,10 @@ int pcmcia_get_first_tuple(client_handle_t handle, tuple_t *tuple) ...@@ -430,7 +430,10 @@ int pcmcia_get_first_tuple(client_handle_t handle, tuple_t *tuple)
#ifdef CONFIG_CARDBUS #ifdef CONFIG_CARDBUS
if (s->state & SOCKET_CARDBUS) { if (s->state & SOCKET_CARDBUS) {
u_int ptr; u_int ptr;
pcibios_read_config_dword(s->cap.cb_dev->subordinate->number, 0, 0x28, &ptr); struct pci_dev *dev = pci_find_slot (s->cap.cb_dev->subordinate->number, 0);
if (!dev)
return CS_BAD_HANDLE;
pci_read_config_dword(dev, 0x28, &ptr);
tuple->CISOffset = ptr & ~7; tuple->CISOffset = ptr & ~7;
SPACE(tuple->Flags) = (ptr & 7); SPACE(tuple->Flags) = (ptr & 7);
} else } else
......
...@@ -517,21 +517,6 @@ void pcibios_update_resource(struct pci_dev *, struct resource *, ...@@ -517,21 +517,6 @@ void pcibios_update_resource(struct pci_dev *, struct resource *,
void pcibios_update_irq(struct pci_dev *, int irq); void pcibios_update_irq(struct pci_dev *, int irq);
void pcibios_fixup_pbus_ranges(struct pci_bus *, struct pbus_set_ranges_data *); void pcibios_fixup_pbus_ranges(struct pci_bus *, struct pbus_set_ranges_data *);
/* Backward compatibility, don't use in new code! */
int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned char *val);
int pcibios_read_config_word (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned short *val);
int pcibios_read_config_dword (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned int *val);
int pcibios_write_config_byte (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned char val);
int pcibios_write_config_word (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned short val);
int pcibios_write_config_dword (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned int val);
/* Generic PCI functions used internally */ /* Generic PCI functions used internally */
int pci_bus_exists(const struct list_head *list, int nr); int pci_bus_exists(const struct list_head *list, int nr);
...@@ -668,8 +653,6 @@ extern struct pci_dev *isa_bridge; ...@@ -668,8 +653,6 @@ extern struct pci_dev *isa_bridge;
static inline int pci_present(void) { return 0; } static inline int pci_present(void) { return 0; }
#define _PCI_NOP(o,s,t) \ #define _PCI_NOP(o,s,t) \
static inline int pcibios_##o##_config_##s (u8 bus, u8 dfn, u8 where, t val) \
{ return PCIBIOS_FUNC_NOT_SUPPORTED; } \
static inline int pci_##o##_config_##s (struct pci_dev *dev, int where, t val) \ static inline int pci_##o##_config_##s (struct pci_dev *dev, int where, t val) \
{ return PCIBIOS_FUNC_NOT_SUPPORTED; } { return PCIBIOS_FUNC_NOT_SUPPORTED; }
#define _PCI_NOP_ALL(o,x) _PCI_NOP(o,byte,u8 x) \ #define _PCI_NOP_ALL(o,x) _PCI_NOP(o,byte,u8 x) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment